Subscribe to this list via RSS Blog posts tagged in Web
join in LINQ to SQL and LINQ to Entities Considered Messy, Redundant In this post I will demonstrate that use of the join keyword in LINQ to SQL and LINQ to Entities is nearly always wrong. LINQ queries which you write with the join keyword are harder to read and write than queries you write using associations, and they require knowledge of database metadata which is not required otherwise. This introduces the potential for errors and makes maintenance harder. Many people ask how to do a "left join" in LINQ to SQL, and unfortunately, the answer they nearly alw...
Projecting Onto a Presentation Model with the Entity Framework and ASP.NET MVC In this post, I will demonstrate how to map entity models to views in an ASP.NET MVC application without worrying about implementation details like eager loading, lazy loading, or having to manually optimize SQL for the task at hand. I will argue that expressing the relationship between an entity model in the presentation model in a LINQ projection is far simpler than other methods of doing this mapping. Imagine that you've been asked to write a new web application to track employees for a cu...

Posted by on in Blogs
Updating to ASP.NET MVC 2 Preview 2 Last week, I updated our main development branch to ASP.NET MVC 2 preview 2 (from preview 1). In this post, I'll list some of the features I've found, and also issues I encountered and how I resolved them. New Features Some of the new features of preview 2 have been discussed elsewhere, so I won't rehash them. But I've also noticed that there is a new attribute, [RequireHttps], which does what you would expect, when added to an action, and a new HTML helper, Html.HttpMethodOverride, which make...
How to Think Like the Entity Framework Presentation Available for Free Download My CodeRage presentation, "How to Think Like the Entity Framework (and why you might want to bother learning that in the first place)," is now available for free download....
How to Think Like the Entity Framework Presentation Available for Free Download My CodeRage presentation, "How to Think Like the Entity Framework (and why you might want to bother learning that in the first place)," is now available for free download....

Posted by on in Blogs
How to Customize ASP.NET MVC Authentication If you are developing a web application which requires authentication or security features not included in the regular ASP.NET membership feature, you might decide to implement these features yourself. But it seems as if the first instinct of many ASP.NET MVC developers is to do this by customizing their Controllers, because they've decided that AuthorizeAttribute can't possibly serve their needs. They will decide that the way to do this is to write some sort of parent Controller type which exam...

Posted by on in Blogs
How to Customize ASP.NET MVC Authentication If you are developing a web application which requires authentication or security features not included in the regular ASP.NET membership feature, you might decide to implement these features yourself. But it seems as if the first instinct of many ASP.NET MVC developers is to do this by customizing their Controllers, because they've decided that AuthorizeAttribute can't possibly serve their needs. They will decide that the way to do this is to write some sort of parent Controller type which exam...
How to Think Like the ADO.NET Entity Framework at CodeRage 4 This coming Wednesday 9 September I'll be doing a presentation at the free, online CodeRage 4 conference: How to Think Like the ADO.NET Entity Framework (and why you might want to bother learning to do so in the first place) In order to use the ADO.NET Entity Framework effectively, you must understand its value-based data model, which is distinctly different from the SQL and ORM approaches to representing and querying data. Programmers who approach the Entity Framework as "just another ORM" o...

Posted by on in Blogs
Columbus Give Camp This past weekend I, along with around 50 other local geeks, volunteered three days of my time to build web applications for eight different Columbus-area nonprofits. Columbus Give Camp is based on a similar series of events in Michigan. The Columbus Give Camp was hosted by Quick Solutions, who, conveniently, are located five floors above my own office. The event was a huge success. I'm particularly proud of the work my team did, taking the project from nothing to live and in production in just ...

Posted by on in Blogs
Columbus Give Camp This past weekend I, along with around 50 other local geeks, volunteered three days of my time to build web applications for eight different Columbus-area nonprofits. Columbus Give Camp is based on a similar series of events in Michigan. The Columbus Give Camp was hosted by Quick Solutions, who, conveniently, are located five floors above my own office. The event was a huge success. I'm particularly proud of the work my team did, taking the project from nothing to live and in production in just ...

Check out more tips and tricks in this development video: