Archives
-
My View on ASP.NET Web Forms versus MVC
A lot has been said on Web Forms and MVC, but since I was recently asked about my opinion on the subject, here it is.
-
Pluggable Rules for Entity Framework Code First
Suppose you want a system that lets you plug custom validation rules on your Entity Framework context. The rules would control whether an entity can be saved, updated or deleted, and would be implemented in plain .NET. Yes, I know I already talked about plugable validation in Entity Framework Code First, but this is a different approach.
-
Unity – Part 5: Injecting Values
This is the fifth post on Unity. You can find the introductory post here, the second post, on dependency injection here, a third one on Aspect Oriented Programming (AOP) here and the latest so far, on writing custom extensions, here. This time we will talk about injecting simple values.
-
NHibernate Conventions
It seems that nowadays everyone loves conventions! Not the ones that you go to, but the ones that you use, that is! It just happens that NHibernate also supports conventions, and we’ll see exactly how.
-
Dynamic LINQ Extension Method
Remember those old posts on Dynamic LINQ? You are probably aware that Microsoft has made its implementation available as a Nuget package, but, like I said, you already have it in your machine, hidden inside the System.Web.Extensions assembly.
-
Comparing LINQ Expressions
I recently came upon this problem: how to calculate a hash from a LINQ expression so that I can safely compare two expressions for equality? I had naively assumed that the Expression class – and their descendants – would have implemented GetHashCode in an appropriate way, so as to make developer’s lifes easier, but unfortunately Microsoft thought otherwise.
-
Entity Framework Metadata
Sometimes it is useful to know something about the physical storage of a code first model. Maybe it’s for SQL reporting or for any other matter, I sometimes have the need to look up the table name where an entity is stored or the column that holds some relation.
-
Unity – Part 4: Extensions
Another long overdue post on Unity. See the first here for an introduction, the second here for dependency injection and the third here for AOP with Unity.