I am trying to use EF6 in my ASP.Net5/MVC6 application, I installed the EF package from Nuget but I am not getting any template to generate the EDMX file (it was possible in previous veriosn of MVC). I found couple of article that talks about code first approach.
But how can I use DB first approach with EF6 and Asp.Net5, because I already have my database design ready. Can someone help me out here.
there are some tutorials that you can see in youtube :
ASP.NET MVC 5 Step by Step: Part 5 Entity Framework Database First
Use ASP.NET Identity on existing DB-Model PART 1
and this is one sample of integration asp.net identity and EF Db First that I developed 2 years ago
you can use following method for generate .EDMX file in code first approach:
void ExportMappings(DbContext context, string edmxFile)
{
var settings = new XmlWriterSettings { Indent = true };
using (XmlWriter writer = XmlWriter.Create(edmxFile, settings))
{
System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(context, writer);
}
}
if your database is already then you can use Entity Framework Power Tools for generate domain classes for using EF code First .