// GET public IActionResult Index() { var command = new ListExpenseReportsCommand(); ExpenseReport[] reports = _bus.Send(command); return(Content("Success")); }
public ActionResult <IEnumerable <ExpenseReport> > Get() { string connectionString = ConfigurationManager.AppSettings["ConnectionString"]; var command = new ListExpenseReportsCommand(); ExpenseReport[] reports = _bus.Send(command); reports[0].Description = connectionString; return(reports); }
public IActionResult Index() { var command = new ListExpenseReportsCommand(); ExpenseReport[] reports = _bus.Send(command); var orderedReports = reports.OrderBy(report => report.Number); return(View(orderedReports.ToArray())); }