Example #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="applicationServices"></param>
        protected BaseService(ApplicationServices applicationServices)
        {
            AppServices = applicationServices;

            DbContext     = applicationServices.DbContext;
            AuthDbContext = applicationServices.AuthDbContext;
            AutoMapper    = applicationServices.AutoMapper;
            MemoryCache   = applicationServices.MemoryCache;
            Logger        = applicationServices.Logger;
            RedisService  = applicationServices.RedisService;
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="dbContext">Database context</param>
 /// <param name="autoMapper">AutoMapper</param>
 /// <param name="memoryCache">Memory Caching</param>
 /// <param name="redisService">Redis Caching</param>
 /// <param name="logger">Logging Service</param>
 /// <param name="authDbContext">Authorization Database Context</param>
 public ApplicationServices(
     WideWorldImportersContext dbContext,
     IMapper autoMapper,
     IMemoryCache memoryCache,
     IRedisService redisService,
     AppLoggers logger,
     AuthenticationProviderContext authDbContext)
 {
     DbContext     = dbContext;
     AutoMapper    = autoMapper;
     MemoryCache   = memoryCache;
     RedisService  = redisService;
     AuthDbContext = authDbContext;
     Logger        = logger;
     ConsoleLogger = logger.ConsoleLogger;
     FileLogger    = logger.FileLogger;
 }