public HttpResponseMessage SaveGroup(UserGroupDTO userGroup) { return SafeAction(() => { IDelightServices service = new DelightServices(); int id = service.SaveUserGroup(userGroup); if (id <= 0) { return Request.CreateResponse(HttpStatusCode.NoContent); } var response = Request.CreateResponse<int>(HttpStatusCode.OK, id); return response; }, userGroup); }