public ActionResult get_BI_Reason() { PatientStatisticsDB _DB = new PatientStatisticsDB(); List <CANServiceType> _RE = _DB.get_BI_Reason(); var serializer = new JavaScriptSerializer { MaxJsonLength = Int32.MaxValue }; var result = new ContentResult { Content = serializer.Serialize(new { Res = _RE ?? new List <CANServiceType>() }), ContentType = "application/json" }; return(result); }