示例#1
0
        public void Configuration(IAppBuilder app)
        {
            AutoMapperConfig.Initialize();

            log4net.Config.XmlConfigurator.Configure(new FileInfo(HostingEnvironment.MapPath("~/Web.config")));
            IlevusIdentityContext context = IlevusIdentityContext.Create();

            IlevusDbInitializer.Initialize(context);
            IlevusDbInitializer.InitializeIdentity(context);

            ConfigureAuth(app);

            app.CreatePerOwinContext(IlevusDBContext.Create);
            IlevusDBContext db = IlevusDBContext.Create();

            db.Migrations();
            db.EnsureIndexes();
            db.EnsureSystemConfig();

            app.UseErrorPage(ErrorPageOptions.ShowAll);
            HttpConfiguration config = WebApiConfig.Create();

            app.UseWebApi(config);
        }
示例#2
0
 public IlevusUserStore(IlevusIdentityContext context)
     : base(new UsersContext <IlevusUser>(context.Users))
 {
 }
示例#3
0
 public IlevusRoleStore(IlevusIdentityContext context)
     : base(new RolesContext <IlevusRole>(context.Roles))
 {
 }