Category Archives: Entity Framework

EntityFramework–What’s in it for Microsoft?

I can’t understand why Microsoft persists with the EntityFramework development. Don’t get me wrong, the project isn’t necessarily terminally flawed or anything, but what is their corporate motivation? Can they go their shareholders and demonstrably show that development of the … Continue reading

Posted in Entity Framework | Leave a comment

NHibernate vs EntityFramework – Experience From the Real World

I got asked today what I considered in choosing NHibernate or Entity Framework. This is a modified version of my response. General Function Both are object relational mappers capable of working with POCO objects, ie objects that are built without … Continue reading

Posted in Design Patterns, Entity Framework, NHibernate | Tagged , | 10 Comments

Lazy Loading and Virtual Proxy Querying in Entity Framework 4

I’ve been kicking the tyres on Entity Framework 4, and have become a bit ambivalent about a few of it’s features – lazy loading and the virtual proxy implementation. I’m using EF 4 code first in a service tier with … Continue reading

Posted in Entity Framework | Tagged , , | Leave a comment

Configuring Entity Framework 4 ‘CodeFirst’

In this post I’m going to cover configuring Entity Framework “CodeFirst”. Custom column name Custom storage type Custom table name Data constraints Ignore a property Turning cascade delete off One to one mapping Inheritance Mapping Table per class heirarchy Table … Continue reading

Posted in Entity Framework, NHibernate | Tagged , , | 7 Comments

Inititializing the DbContext

This is part of a series of posts regarding the new Entity Framework 4 Code First Framework. In my last post I showed the simplest EF 4Code First demonstration. I’m going to flesh the example out a bit over the … Continue reading

Posted in Entity Framework | Tagged , | 1 Comment

The simplest Entity Framework Code First Demo Ever

I’ve downloaded VS2010 SP1 Beta, EntityFramework CTP 5 and SQLCE tooling for VS2010 Beta. Today I want to create the SIMPLEST demo to show it hangs together. It will not take long!! 1. Create a new console app. 2. Add … Continue reading

Posted in Design Patterns, Entity Framework, SQL CE | Leave a comment