I have implemented the project of EntityFramework 6 into EntityFramework Core 3.1. Using Roslyn API, I have to do migrate the Mapping the entity to tables in Entity framework. I have no idea about this.
Sample.cs
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<Student>().Map(m =>
{
m.Properties(p => new { p.StudentId, p.StudentName});
m.ToTable("StudentInfo");
}).Map(m => {
m.Properties(p => new
{ p.StudentId, p.Height, p.Weight, p.Photo, p.DateOfBirth});
m.ToTable("StudentInfoDetail");
});
modelBuilder.Entity<Standard>().ToTable("StandardInfo");
}
Based on stack overflow links are suggested, there is no more supported in EF core. Ref: One Entity 2 Tables in EF Core 2.0
Kindly suggest on alternative solution on this and how to do in Roslyn API?