public ActionResult ListOfPatients() //return Listt of patients { List <Patient> patientList = CreateListOf.Patients(); Sorting sort = new Sorting(patientList, ""); ViewBag.UserId = User.Identity.GetUserId(); return(View(sort)); }
[Authorize(Roles = "admin, doctor, nurse")] // patients list public ActionResult ListOfPatients(Sorting s) { List <Patient> patients = CreateListOf.Patients(); Sorting sort = new Sorting(patients, s.HowToSort); ViewBag.UserId = User.Identity.GetUserId(); patients = sort.Patients(); return(View(new Sorting(patients))); }