public RepositoryBase(IBudgetDbSettings settings, string collectionName) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _db = database.GetCollection <T>(collectionName); }
public ExpenseController(IExpenseService expenseService, IMapper mapper, ILogger <ExpenseController> logger, IBudgetDbSettings dbSettings) { _mapper = mapper; _logger = logger; _expenseService = expenseService; _dbSettings = dbSettings; }
public ExpenseRepository(IBudgetDbSettings settings) : base(settings, "Expenses") { }
public IncomeRepository(IBudgetDbSettings settings) : base(settings, "Income") { }
public TransactionRepository(IBudgetDbSettings settings, string collectionName) : base(settings, collectionName) { }
public BalanceAdjustmentRepository(IBudgetDbSettings settings) : base(settings, "BalanceAdjustment") { }