public bool DeleteDoctorById(string userid) { Doctor reqDoc = repository.GetDoctorById(userid); if (reqDoc != null) { return(repository.DeleteDoctorById(userid)); } else { throw new DoctorNotFoundException($"Doctor with id {userid} does not exist"); } }