Category Archives: Entity Framework

Entity Framework Power Tools Beta 4

New update to the Entity Framework Power tools now version 0.9.0.0 from 0.7.0.0 created by the Entity Framework Team (Microsoft), updated: 10/11/2013.

Posted in Entity Framework | Tagged , | Leave a comment

Avoid Entity Framework Pluralizing

In Entity Framework (EF) tables names get pluralized. In EF terminology an Entity Set = Table and Entity = Row. So Entity Sets get pluralized.  DbModelBuilder.Conventions.Remove<PluralizingTableNameConvention>() That line prevents table names from being pluralized. Example: That’s it!

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

Entity Framework Code First Example in MVC 4.

This example will show you how to create a MVC 4 application using Entity Framework Code First in Visual Studio 2012. 1. Create a new Project MVC 4 Internet template. Name: MVCMovieTraining. 2. In the Models folder add new class. Name: … Continue reading

Posted in CSharp, Entity Framework, MVC, Visual Studio 2012 | Tagged , , , , , , , , | 1 Comment

Repository Pattern

Use a Repository to separate logic that retrieves data from the business logic. It is an abstraction between data access and business logic. The following example is based on the project in the post Entity Framework Code-First example in MVC 4, in … Continue reading

Posted in CSharp, Entity Framework, MVC, Visual Studio 2012 | Tagged , , , , , | 1 Comment

Text Template Transformation Toolkit (T4)

Template based text generation framework included in Visual Studio Used by ASP.NET MVC (for generate Views and Controllers) Entity Framework (for entity generation) ASP.NET Dynamic Data

Posted in Entity Framework, T4, Visual Studio 2012 | Tagged , , , , , , , | Leave a comment

DbContext API

Classes: DbContext, DbSet and DbQuery

Posted in Entity Framework, Visual Studio 2012 | Tagged , , | Leave a comment