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