Exemplo n.º 1
0
 // 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();
 }
Exemplo n.º 2
0
 protected override void OnEntityMap(EntityClassMap map, string contextName)
 {
     map.AddMap(new UserMapping().MapToDbCollection(), contextName);
 }
Exemplo n.º 3
0
 protected override void OnEntityMap(EntityClassMap map)
 {
     map.AddMap(new UserMapping());
 }