// GET: api/TipoNomina/5 public IHttpActionResult Get(string id) { try { IEnumerable <TipoNomina> list = ServicioTNM.Find(id); return(Ok( list.FirstOrDefault() ?? new TipoNomina() )); } catch (Exception) { return(BadRequest()); } }
// GET: api/TipoNomina public IHttpActionResult Get() { try { IEnumerable <TipoNomina> list = ServicioTNM.Find(null); return(Ok( list )); } catch (Exception) { return(BadRequest()); } }