public ActionResult Index() { var vm = new PatientListViewModel(); var physician = physicianSvc.GetPhysician(User.Identity.Name); if (physician != null) { vm.Patients = physician.Patients; } return View(vm); }
public ActionResult Me() { var vm = new PatientListViewModel(); var patient = PatientSvc.GetPatientByUserName(User.Identity.Name); if (patient == null) { return RedirectToAction("Index", "Home"); } return RedirectToAction("File", new { id = patient.ID }); }