public IActionResult Index() { var result = _businessPatient.FindAllPatients().Result; ViewBag.ListPatient = result; return(View()); }
public JsonResult GetPatients(int idPatient, string date) { var result = _businessPatient.FindAllPatients().Result; result.ToList().ForEach(res => { res.SCOMPLETENAME = string.Format("{0} {1}{2} {3}", res.SFIRSTNAME, res.SSECONDNAME == string.Empty ? "" : res.SSECONDNAME + " ", res.SLASTNAME, res.SLASTNAME1); }); return Json(new { lista = result }); }