public JsonResult _getBill(string physicians, DateTime startDate, DateTime endDate) { string user = User.Identity.GetUserId(); //startDate = startDate.AddDays(-18); //endDate = endDate.AddDays(-18); Kendo.DynamicLinq.DataSourceRequest request = null; List <int> caseStatus = new List <int>(); List <string> physiciansList = new List <string>(); physiciansList.Add(user); decimal amount = 0; try { var result = _rateService.GetPhysicianBillingAmount(request, physiciansList, startDate, endDate, caseStatus, ShiftType.All, requestFor: "load"); if (result != null) { amount = result.Where(x => x.AssignDate == "Total Earned").Single().Amount; } //result.Sum(x => x.Amount); use this code when multiple physician open //amount = _rateService.getBill(user, startDate, endDate); default code return(Json(amount, JsonRequestBehavior.AllowGet)); } catch { return(Json(amount, JsonRequestBehavior.AllowGet)); } }