public class DAL : DbContext { public DAL() : base("TestConnectionString") { } public DbSet<Employee> employees { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder) { //base.OnModelCreating(modelBuilder); modelBuilder.Entity<Employee>().ToTable("EmployeeTable"); modelBuilder.Entity<Employee>().HasKey(x => x.Id); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)