コード例 #1
0
ファイル: RepositoryBase.cs プロジェクト: kmhoran/BudgetV2
        public RepositoryBase(IBudgetDbSettings settings, string collectionName)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _db = database.GetCollection <T>(collectionName);
        }
コード例 #2
0
ファイル: ExpenseController.cs プロジェクト: kmhoran/BudgetV2
 public ExpenseController(IExpenseService expenseService, IMapper mapper, ILogger <ExpenseController> logger, IBudgetDbSettings dbSettings)
 {
     _mapper         = mapper;
     _logger         = logger;
     _expenseService = expenseService;
     _dbSettings     = dbSettings;
 }
コード例 #3
0
 public ExpenseRepository(IBudgetDbSettings settings)
     : base(settings, "Expenses")
 {
 }
コード例 #4
0
 public IncomeRepository(IBudgetDbSettings settings)
     : base(settings, "Income")
 {
 }
コード例 #5
0
 public TransactionRepository(IBudgetDbSettings settings, string collectionName)
     : base(settings, collectionName)
 {
 }
コード例 #6
0
 public BalanceAdjustmentRepository(IBudgetDbSettings settings)
     : base(settings, "BalanceAdjustment")
 {
 }