Tag Archives: EF

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! Advertisements

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

Entity Framework Power Tools Beta 3

An extension that allows you to reverse engineer “Code First”. Generates POCO classes, derived DbContext and Code First mapping for an existing database. You can download here: Entity Framework Power Tools Beta 3 When right-clicking on a C# project, the … Continue reading

Posted in EF Tools | Tagged , , | Leave a comment

DbContext API

Classes: DbContext, DbSet and DbQuery

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