public IHttpActionResult GetSpecialist() { try { SpecialistManager manager = new SpecialistManager(); List <Specialist> lista = manager.Obtener(); GetSpecialists temp; temp.specialists = lista; return(Ok(temp)); }catch (Exception e) { return(NotFound()); } }
public IHttpActionResult GetSpecialist(int id) { try { SpecialistManager manager = new SpecialistManager(); var specialist = manager.Obtener(id); if (specialist != null) { return(Ok(specialist)); } else { return(NotFound()); } }catch (Exception e) { return(NotFound()); } }