public override void Initialize() { ModelMappers.MapperRegister(); GlobalApplicationObject.Current.EventsManager.OnApplication_InitializeComplete += EventsManager_OnApplication_InitializeComplete; // GlobalConfigurationManager.ODataBuilder.EntitySet<SiteAdminNavigation>("SiteAdminNavigations"); var Token = System.Configuration.ConfigurationManager.AppSettings["TokenStoreType"]; //Database Server Local if (Token == "Database") { //΢ÐÅtoken Êý¾Ý¿â»º´æ CacheStrategyFactory.RegisterContainerCacheStrategy(() => { var obj = DBContainerCacheStrategy.Instance; ((DBContainerCacheStrategy)obj)._unitOfWork = new CodeFirstDbContext(); return(obj); }); } //var Ticket = System.Configuration.ConfigurationManager.AppSettings["TicketStoreType"]; //Database Server Local //if (Ticket == "Database") //{ // //΢ÐÅtoken Êý¾Ý¿â»º´æ // CacheStrategyFactory<JsApiTicketBag>.RegisterContainerCacheStrategy(() => // { // var obj = DBContainerCacheStrategy.Instance; // ((DBContainerCacheStrategy)obj)._unitOfWork = new CodeFirstDbContext(); // return obj; // }); //} }
public void DBConfig() { var Asss = AppDomain.CurrentDomain.GetAssemblies().Where(a => a.FullName.Contains("Innocellence") || a.FullName.Contains("Infrastructure")); foreach (var ass in Asss) { DatabaseInitializer.AddMapperAssembly(ass); } ModelMappers.MapperRegister(); }
public override void Initialize() { GlobalApplicationObject.Current.EventsManager.OnApplication_InitializeComplete += EventsManager_OnApplication_InitializeComplete; ModelMappers.MapperRegister(); // 注册微信消息事件 QyMessageHandler<QyCustomMessageContext>.QyMessageHandlerEvent += QyMessageHandlers.QyCustomMessageHandler.StaticQyMessageEventHandler; // GlobalApplicationObject.Current.EventsManager.OnApplication_InitializeComplete += EventsManager_OnApplication_InitializeComplete; // GlobalConfigurationManager.ODataBuilder.EntitySet<SiteAdminNavigation>("SiteAdminNavigations"); }
public override void Initialize() { ModelMappers.MapperRegister(); // GlobalApplicationObject.Current.EventsManager.OnApplication_InitializeComplete += EventsManager_OnApplication_InitializeComplete; // GlobalConfigurationManager.ODataBuilder.EntitySet<SiteAdminNavigation>("SiteAdminNavigations"); }