public ActionResult <IEnumerable <AppointmentViewModel> > FindByIdUser(String staffid) { var response = _Service.FindByIdUser(staffid); if (response.Error) { return(BadRequest(response.Message)); } var patient = response.Object.Select(p => new AppointmentViewModel(p)); return(Ok(patient)); }