public Rol Add(Rol rol) { try { return(repository.Add(rol)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public HttpResponseMessage PostRol(Rol rol) { if (rol != null) { var result = _rolRepository.Add(rol); return(Request.CreateResponse(HttpStatusCode.OK, result)); } else { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } }
public ResultMessage <Rol> Add(Rol data) { return(repository.Add(data)); }