In the world of relational data, many-to-many relationships are one of the hardest concepts to understand and implement correctly. Quite likely the scenario will arise for a developer to decide whether to support a one-to-many or a many-to-many schema, and out of fear we crumble to an “easy” design. This article will use real world [...]
Read More >>
While the title of this article may seem misleading, you actually can achieve incredible performance gains by updating your web application to use LINQ. This article will dispell some common myths about LINQ and demonstrate how LINQ can practically increase performance. The examples in this article will be using LINQ to SQL, but the principles [...]
Read More >>
LINQ (Language INtegrated Query) is a powerful but misunderstood new language feature brought to us in the .NET framework version 3.5 (C# 3.0 and VB 9). Even though this is a new feature, it already has some huge misconceptions (such as thinking LINQ is a replacement to SQL). This article will teach you how to [...]
Read More >>
The GridView control in ASP.NET 2.0 is lacking some major (yet common) functionality – sorting. This article will show you how to create a “self-sorting” GridView using LINQ expression trees. First, it’s important to explain what I mean when I say that the GridView doesn’t have sorting capabilities. You’re probably saying to yourself – “I [...]
Read More >>
Microsoft’s Entity Framework is a new, powerful tool bringing data modeling, O/RM (object relational mapping) functionality and more. One expected feature of major ORMs is ‘Lazy Loading’. Learn how the Entity Framework provides this functionality in a different way. This article will explain the design reasons behind why EF is different than what you would [...]
Read More >>
The “Distinct” function in LINQ is definitely one of the top 10 most used functions, but it’s probably one of the top 10 most incomplete as well. This article will show how to extend the IEnumerable interface to allow a very easy way to specify what property makes your list unique (or ‘distinct’). If you [...]
Read More >>
Hot off the presses, and new to ASP.NET MVC (Preview 5) is an awesome capability that (in my opinion) revolutionizes the way we design web applications. This feature is being touted (by me) as “the ViewState for MVC”. First, the Challenge A common challenge of web applications is passing complex types and (more difficultly) stateful [...]
Read More >>
One of the biggest benefits of MVC is it’s direct link to Test Driven Development. Because of some of the new features of ASP.NET MVC Preview 5 (ModelBinders in particular), testing your Action methods is even easier. This article will demonstrate how easy it is to ensure the quality of your MVC app with unit [...]
Read More >>
The previous article on ModelBinders gave a basic introduction, showed a few code samples, and showed a creative usage of ModelBinders. However, some questions arose, some claims were challenged (particularly about comparing ModelBinders to the WebForms ViewState) and some controversial code needs further flushing out. This article will do just that. To begin with, we [...]
Read More >>
As AJAX-enabled web sites continue to grow in popularity, the development community continues to try to solve the common problems of using AJAX. One big concern that used to require a lot of work is that of gracefully degrading your AJAX site for non-capable browsers. Thankfully, the ASP.NET MVC framework makes this an easy task. [...]
Read More >>