Beispiel #1
0
 // 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());
     }
 }
Beispiel #2
0
 // GET: api/TipoNomina
 public IHttpActionResult  Get()
 {
     try
     {
         IEnumerable <TipoNomina> list = ServicioTNM.Find(null);
         return(Ok(
                    list
                    ));
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }