public ExpenseDTO GetExpenseById(string currentUser, int id) { return((from e in _expRepo.Get(currentUser, id) // where e.Id == id, where clauses only belong in the Repository select new ExpenseDTO() { Id = e.Id, ApptDate = e.ApptDate, CategoryType = e.Category.CatType, Cost = e.Cost, Description = e.Description, Physician = e.Physician }).FirstOrDefault()); }
public IEnumerable <ListExpenseViewModel> Get() { return(_repository.Get()); }