// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddMvc(); services.AddIdentity <Models.IdentityUser, Models.IdentityRole>(options => { }); services.AddSingleton <IEntity, Entity>(); services.AddScoped(typeof(IRepository <>), typeof(MongoRepository <>)); services.AddScoped <IUserStore <Models.IdentityUser>, UserStore>(); services.AddScoped <IRoleStore <Models.IdentityRole>, RoleStore>(); EntityClassMap.Instance(); }
protected override void OnEntityMap(EntityClassMap map, string contextName) { map.AddMap(new UserMapping().MapToDbCollection(), contextName); }
protected override void OnEntityMap(EntityClassMap map) { map.AddMap(new UserMapping()); }