// GET
        public IActionResult Index()
        {
            var command = new ListExpenseReportsCommand();

            ExpenseReport[] reports = _bus.Send(command);

            return(Content("Success"));
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        public IActionResult Index()
        {
            var command = new ListExpenseReportsCommand();

            ExpenseReport[] reports        = _bus.Send(command);
            var             orderedReports = reports.OrderBy(report => report.Number);

            return(View(orderedReports.ToArray()));
        }