AddFromThisAssembly

Extensión method for ConfigurationRegistrar to use this as the assembly that contains all EntityTypeConfiguration clases to be added into ModelConfiguration.

        public class Context
            :DbContext
        {
            public DbSet<Customer> Customers { get; set; }

            protected override void OnModelCreating(DbModelBuilder modelBuilder)
            {
                modelBuilder.Configurations.AddFromThisAssembly();
            }
        }



Last edited Oct 21, 2013 at 6:10 PM by UnaiZorrilla, version 1