public HttpResponseMessage Post([FromBody] SYS_Role value) { try { var result = context.Create(value); return(Request.CreateResponse(HttpStatusCode.OK, result)); } catch (Exception e) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, e.Message)); } }
public Role Create(Role role) { return(db.Create(role)); }
public void TestCreateRole() { Assert.IsNotNull(db.Create(testRole)); }