I have read and seen few projects that talks about splitting or multiple DbContext and I'm not sure what is the best practice.. should I create each DbContext for each entity or have all entity in one DbContext?
this is what I have for now.
public class PersonsContext : DbContext
{
public PersonsContext() : base("name=EmployeeContext")
{
}
public DbSet<Person> People { get; set; }
}
public class OrderContext : DbContext
{
public OrderContext() : base("name=EmployeeContext")
{
}
public DbSet<Order> People { get; set; }
}