read this article https://jinishbhardwaj.wordpress.com/2014/07/16/decoupling-asp-net-identity-2-0-from-entity-framework-in-mvc5-part-1/
but see the below code which is not clear
public class ApplicationDbContext: DbContext { static ApplicationDbContext() { Database.SetInitializer<ApplicationDbContext>(null); } public ApplicationDbContext() : base("DefaultConnection") { this.Configuration.ValidateOnSaveEnabled = true; this.Configuration.AutoDetectChangesEnabled = true; } public new IDbSet<T> Set<T>() where T : class { return base.Set<T>(); } protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Configurations.AddFromAssembly(typeof(IdentityModel.Configurations.IdentityUserConfiguration).Assembly); } }
1) what is the below code.......is it indexer ? how it will be used and what it will do ?
public new IDbSet<T> Set<T>() where T : class { return base.Set<T>(); }
see this line
protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Configurations.AddFromAssembly(typeof(IdentityModel.Configurations.IdentityUserConfiguration).Assembly); }
modelBuilder.Configurations.AddFromAssembly(typeof(IdentityModel.Configurations.IdentityUserConfiguration).Assembly);
what the above line is doing ? please guide me.
thanks