public SalaResponse LeerPorId(int id) { try { var response = new SalaResponse(); var bc = new SalaComponent(); response.Result = bc.Find(id); return(response); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, ReasonPhrase = ex.Message }; throw new HttpResponseException(httpError); } }
public Sala Find(int?id) { var bc = new SalaComponent(); return(bc.Find(id)); }