A View by Any Other Name...

Some of the most common confusions I hear about from MVC developers concern views, specifically layouts vs. partial views vs. views. The simple fact is that the terms "layout" and »

DbEntityValidationException: Which Properties Are Failing Validation?

Just a little quick tip to make your life easier. You'll get a DbEntityValidationException when Entity Framework attempts to save an entity to the database and fails because one or »

Stop using [Bind]

There's a lot to like about ASP.NET MVC, but some parts are just atrocious. The Bind attribute is one of those atrocious parts. For the seemingly few who are »

Automatically get ASP.NET Identity user with an assist from Ninject

How many times have you found yourself doing this: [Authorize] public async Task<ActionResult> Foo() { var user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); if (user == null) { AuthenticationManager.SignOut »

UrlHelper Extension to Modify Query String

The following extension method allows you to add, update, or remove parameters from a URL's query string. public static class UrlHelperExtensions { /// <summary> /// Add, update, or remove parameters from »

System.NullReferenceException: Object reference not set to an instance of an object

For some reason, this particular error seems to just confuse the stuffing out of ASP.NET MVC developers in particular. Granted, it's not one of the most obvious or informative »