Example #1
0
 public LanguageService(IApplicationContext applicationContext,
                        ICacheManager <ConcurrentDictionary <string, ConcurrentDictionary <string, LanguageEntity> > > cacheManager,
                        EasyDbContext easyDbContext)
     : base(applicationContext, easyDbContext)
 {
     _cacheManager = cacheManager;
 }
Example #2
0
        public static EasyDbContext Make(IServiceProvider provider)
        {
            var options = new DbContextOptionsBuilder <EasyDbContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString())
                          .UseInternalServiceProvider(provider)
                          .ConfigureWarnings(x => x.Ignore(InMemoryEventId.TransactionIgnoredWarning))
                          .Options;

            var db = new EasyDbContext(options);

            db.Database.EnsureCreated();

            db.Developers.Add(DeveloperFake.New().Build());

            db.SaveChanges();

            return(db);
        }
Example #3
0
 public UserService(IApplicationContext applicationContext, EasyDbContext easyDbContext) : base(applicationContext, easyDbContext)
 {
 }
Example #4
0
 public SystemService(EasyDbContext db)
 {
     _db = db;
 }
 public LanguageService(IApplicationContext applicationContext, EasyDbContext easyDbContext) : base(applicationContext, easyDbContext)
 {
 }
Example #6
0
 public RoleService(IPermissionService permissionService, IApplicationContext applicationContext, EasyDbContext easyDbContext)
     : base(applicationContext, easyDbContext)
 {
     _permissionService = permissionService;
 }
Example #7
0
 public ConfigurationTest()
 {
     _db = DbContextBuilder.Make(DependenceInjectionTest.Make());
 }
 public PermissionService(IApplicationContext applicationContext, EasyDbContext easyDbContext) : base(applicationContext, easyDbContext)
 {
 }
 public DataDictionaryService(IApplicationContext applicationContext, EasyDbContext easyDbContext) : base(applicationContext, easyDbContext)
 {
 }
Example #10
0
 public DeveloperRepository(EasyDbContext db)
 {
     _db = db;
 }