Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# ef dynamic ApplyConfiguration

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
   base.OnModelCreating(modelBuilder);

   modelBuilder.ApplyConfigurationsFromAssembly(typeof(UserConfiguration).Assembly); // Here UseConfiguration is any IEntityTypeConfiguration
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ef #dynamic #ApplyConfiguration
ADD COMMENT
Topic
Name
4+4 =