protected void Application_Start() { var logService = LoggingManager.GetLogInstance(); logService.LogInformationFormat("PMS web call start :" + DateTime.Now); BundleTable.EnableOptimizations = true; AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); _iPMSService = new PmsService(); if (_iPMSService != null && HttpContext.Current.Application["PMSService"] == null) { HttpContext.Current.Application["PMSService"] = _iPMSService; } _iDalFactory = new DalFactory(); if (_iDalFactory != null && HttpContext.Current.Application["DalFactory"] == null) { HttpContext.Current.Application["DalFactory"] = _iDalFactory; } logService.LogInformationFormat("PMS web call stop :" + DateTime.Now); }
public LogService() { log4net.Config.XmlConfigurator.Configure(); _logger = LogManager.GetLogger(GetType()); if (_dalFactory == null) { _dalFactory = (IDalFactory)HttpContext.Current.Application["DalFactory"]; } }
protected void Application_Start() { GlobalConfiguration.Configuration.Formatters.Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter); var json = GlobalConfiguration.Configuration.Formatters.JsonFormatter; json.SerializerSettings.DefaultValueHandling = Newtonsoft.Json.DefaultValueHandling.Ignore; AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); _iDalFactory = new DalFactory(); if (_iDalFactory != null && HttpContext.Current.Application["DalFactory"] == null) { HttpContext.Current.Application["DalFactory"] = _iDalFactory; } _iCacheProvider = new CacheProvider(); if (_iCacheProvider != null && HttpContext.Current.Application["CacheProvider"] == null) { HttpContext.Current.Application["CacheProvider"] = _iCacheProvider; } try { foreach (var item in ServiceLocator.Current.GetAllInstance <IRestController>()) { item.MapHttpRoutes(GlobalConfiguration.Configuration); } } catch (ReflectionTypeLoadException ex) { string exceptionList = string.Empty; foreach (Exception loaderException in ex.LoaderExceptions) { exceptionList += loaderException.Message + "\n"; } throw; } }
public BaseService(IDalFactory factory) { _dalfactory = factory; }
public CurrencyBll(IMapper mapper, IDalFactory dalFactory) { _mapper = mapper; _dalFactory = dalFactory; }
public ActiveDirectoryBll(IDalFactory dalFactory) : base() { this.bllFactory = new BllFactory(); }
public AdminService(IDalFactory factory) : base(factory) { }
public ProductService(IDalFactory factory) : base(factory) { }
protected override void OnDispose() { Factory.Dispose(); _factory = null; }
static DalFactory() { Factory = new DefaultDalFactory(); }
public TrackBll(IDalFactory _dalFactory) { this._dalFactory = _dalFactory; }
public BllFactory(IDalFactory dalFactory) { _dalFactory = dalFactory; }
public TransactionBll(IDalFactory dalFactory) { _dalFactory = dalFactory; }
public BllFactory(IDalFactory dalFactory, IMapper mapper, UserManager <AppUser> userManager) { _dalFactory = dalFactory; _mapper = mapper; _userManager = userManager; }
/// <summary> /// 加载Dal工厂 /// </summary> /// <param name="dalFactory">实际运用的Dal工厂类</param> public static void Load(IDalFactory dalFactory) { DalManager.dalFactory = dalFactory; }
public AccountBll(IMapper mapper, UserManager <AppUser> userManager, IDalFactory dalFactory) { _dalFactory = dalFactory; _mapper = mapper; _userManager = userManager; }
public AlbumBll(IDalFactory dalFactory) { _dalFactory = dalFactory; }
public PaymentService(IDalFactory factory) : base(factory) { }
public OrderService(IDalFactory factory) : base(factory) { }
public CartService(IDalFactory factory) : base(factory) { }
public TagService(IDalFactory factory) : base(factory) { }