Every time I start a new ASP.NET project, I forget the function required to ensure that all links generated out of ASP.NET are lowercase. So this post is as much a reminder for me, than information for anyone else. Personally think all lowercase URLs look better rather than the usual mismatch of cases that a
As you build out a site using the code first approach, at some point you will most likely need to add an additional lookup field to a class. There are a couple of steps required above what’s automatically done for you by EF code first migrations to make things work happily. If you consider the
An application I’m working on requires a facebook style status system and I thought it would be good to include the “posted x minutes ago” text after the status. I’m sure my code is not the most elegant solution but it works so I thought I’d share.
If you’re using LINQ to SQL as your data provider then you will need to add a few extra steps to utilise Data annotations with ASP.NET MVC. If you have created your own objects then you can append annotations such as [DisplayName(“This is the display name I want in the view”)] directly to the object
I needed to get a number of random records from a table. This is a very quick and easy mechanism to use and will work on any table. To load a specific number of random records change the .First() function to be .Take(x) replacing x with however many records you need.