public CreateExpenseCommand( IDatabaseService database, IExpenseFactory factory, IBalanceSheetService balanceSheetService ) { _database = database; _factory = factory; _balanceSheetService = balanceSheetService; }
public ExpenseService( IUnitOfWork unitOfWork, IRepository <Expense> expenseRepositoryEF, IRepository <ExpenseCategory> expenseCategoryRepositoryEF, IExpenseFactory expenseFactory, ICommentFactory commentFactory) { if (unitOfWork == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "unitOfWork")); } if (expenseRepositoryEF == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "expenseRepositoryEF")); } if (expenseCategoryRepositoryEF == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "expenseCategoryRepositoryEF")); } if (expenseFactory == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "expenseFactory")); } if (commentFactory == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "expenseFactory")); } this.unitOfWork = unitOfWork; this.expenseRepositoryEF = expenseRepositoryEF; this.expenseCategoryRepositoryEF = expenseCategoryRepositoryEF; this.expenseFactory = expenseFactory; this.commentFactory = commentFactory; }