// GET: Empleados/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Empleado empleado = EmpleadoBLL.Get(id); if (empleado == null) { return(HttpNotFound()); } return(View(empleado)); }
public IHttpActionResult Get(int id) { try { Empleado result = EmpleadoBLL.Get(id); if (result == null) { return(NotFound()); } return(Content(HttpStatusCode.OK, result)); } catch (Exception ex) { return(Content(HttpStatusCode.BadRequest, ex)); } }