public async Task <ActionResult> ViewProfile(string id) { var patientprofile = new PatientProfileViewModel() { PatientId = id, PatientDetails = await _patientServices.GetPatientDetailsById(id), Listofdoctors = _patientServices.GetDoctorsByPatient(id), Lastvisited = _appointmentServices.LastVisited(id) }; return(View(patientprofile)); }