Пример #1
0
 public UnitOfWork(
     SinanceContext context,
     IGenericRepository <SinanceUserEntity> userRepository,
     IGenericRepository <BankAccountEntity> bankAccountRepository,
     IGenericRepository <CategoryEntity> categorieRepository,
     IGenericRepository <CategoryMappingEntity> categoryMappingRepository,
     IGenericRepository <CustomReportCategoryEntity> customReportCategorieRepository,
     IGenericRepository <CustomReportEntity> customReportRepository,
     IGenericRepository <ImportBankEntity> importBankRepository,
     IGenericRepository <ImportMappingEntity> importMappingRepository,
     IGenericRepository <TransactionCategoryEntity> transactionCategorieRepository,
     IGenericRepository <TransactionEntity> transactionRepository)
 {
     Context                        = context;
     UserRepository                 = userRepository;
     BankAccountRepository          = bankAccountRepository;
     CategoryRepository             = categorieRepository;
     CategoryMappingRepository      = categoryMappingRepository;
     CustomReportCategoryRepository = customReportCategorieRepository;
     CustomReportRepository         = customReportRepository;
     ImportBankRepository           = importBankRepository;
     ImportMappingRepository        = importMappingRepository;
     TransactionCategoryRepository  = transactionCategorieRepository;
     TransactionRepository          = transactionRepository;
 }
Пример #2
0
        public GenericRepository(SinanceContext dbContext)
        {
            _context = dbContext;

            _dbSet = _context.Set <TEntity>();
        }