I've the next context:
public class MyContext : DbContext
{
public virtual DbSet<Customer> Customers { get; set; }
public virtual DbSet<Provider> Providers { get; set; }
public virtual DbSet<Product> Products { get; set; }
}
Exists any method to get all entities of my context?
Something like MyContext.GetAllEntities()
that returns {Customer, Provider, Product}
.
EDIT
I want retrieve the entities in OnModelCreating
for creating indexes in determinated properties that are decorated with custom attribute.
On OnModelCreating
I can not access to the context how it's explains in this question
Thanks!