public async Task <ActionResult> EditPatient(int?id) { if (id == null) { return(NotFound()); } var pat = await _patient.Get(id); if (pat == null) { return(NotFound()); } ViewData["BloodGroupId"] = new SelectList(_context.BloodGroup, "Id", "Name"); return(View(pat)); }