Step how to use POCO on EF 6

We both know that EF 6 we can easly created with Visual Studio 2013.

How to use the EF 6, and here as below the steps :

  1. Add New Item to project, “ADO .NET Entity Data Model”, connect to DB and add all db objects you want.
  2. Add New Item to project, “EF 5.x DbContext Generator” Or “EF 6 DbContext Generator”
  3. When created it will throw an error*, replace the string $edmxInputFile$ with .edmx file name. Save project.

const string inputFile = @”$edmxInputFile$”;

It will create POCO model files in the same folder as generator .tt template files are positioned.

4. Please overwrite the replacement token ‘$edmxInputFile$’ with the actual name of the .edmx file you would like to generate from. 1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.