public ActionResult Statements() { //DateTime min = DateTime.Now.AddMonths(-1).Date; //DateTime max = DateTime.Now.Date; CakesPosRepository cpr = new CakesPosRepository(_connectionString); IEnumerable <OrderHistoryViewModel> orders = cpr.GetCatererOrdersForStatements(); orders = orders.OrderBy(o => o.lastName); return(View(orders)); }