Why we need to pass DbContextOptions in to Context class Constructor in Entity Framework .NET Core?
Why we need to pass DbContextOptions<StudentContext> in to StudentContext Class Constructor ?
My context class as below,
public class StudentContext:DbContext { public StudentContext(DbContextOptions<StudentContext> options):base(options) { } public DbSet<Student> Students { get; set; } }
Add comment