Makesh Arinha Valappil Makesh Arinha Valappil -4 years ago 163
C# Question

How to add EntityObject Generator in Visual Studio 2015?

I have installed the latest Entity Framework version (EntityFramework.6.1.3) in VS2015. I have added the EF in the project and deleted the 2 .tt files (edmx_file_name.tt and edmx_file_name.Context.tt) as they were from the DBContext.

Now I am trying to add the EF 6.x code generation template by open the model in the EF Designer, right-click on the design surface and select Add Code Generation Item.

To add the Code Generation in ObjectContext i need to install the EF 6.x EntityObject Generator. I downloaded it from here.

But it I couldn't install it in VS 2015.

How do I solve this?

Answer Source

Since until now, no EntityObject Generator Template is supported in Visual Studio 2015, the alter solution is, open your solution with Visual Studio 2013, then open your edmx diagram, right click, select "Add Code generation Item", you will see "EF 6.X EntityObject Generator", if you cannot see it, go to "online" menu, and you will see "EF 6.x EntityObject Generator For C#" display. Select the EntityObject Generator and click "Add" button to add it to you data access layer project. The tt will auto generate EntityObject classes for you. Save the project, exit visual studio 2013. Reopen the solution with visual studio 2015. Done.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download