Tag Archive: orm

Persistence Ignorant Architecture with Entity Framework ORM.

I finished the screencast and have uploaded it to YouTube here. I also have attached the source code to this blog post, but I wanted to comment on a few post-video changes I have made.

providerConnectionString = String.Empty;

if (String.IsNullOrWhiteSpace(providerConnectionString)) {
    throw new System.NotImplementedException(Properties.Resources.ConnectionStringNotSet);
}

I removed App.config from the project (which was never needed). You will need to set the connection string yourself, and I added the code to throw an exception with a reminder in case you forget. You should be able to use the Create Database from Model feature in the Entity Designer, but I was having troubles in the screencast so I created the tables manually.

Screencast Demo Code
Visual Studio 2010
Download PI-Entity-Demo.zip