public async Task <IActionResult> GetDashModel() { DashboardModel dashboardModel = new DashboardModel(); var ListSales = _context.GetSales(); dashboardModel.SalesCount = ListSales.Result.Count; dashboardModel.Money = ListSales.Result.Sum(t => t.Total); return(Ok(dashboardModel)); }
public async Task <IActionResult> GetAllSales() { return(Ok(await _context.GetSales())); }