public EditExpenditureDto GetExpenditureToEdit(int id) { var expenditure = _expenditureRepository.Get(id); var expeditureDto = _mapper.Map <EditExpenditureDto>(expenditure); return(expeditureDto); }
public IActionResult Get([FromQuery] string date) { var filterDate = DateTime.Now; if (date != null) { filterDate = DateTime.ParseExact(date, "dd-MM-yyyy", CultureInfo.InvariantCulture); } var expenditures = _expendRepository.Get() .Include(e => e.ReFunds) .Where(e => e.FundedTime.Date.Equals(filterDate.Date)); return(Ok(expenditures)); }
public Expenditure Get(int id) { return(_expenditureRepository.Get(id)); }