public IHttpActionResult CreateBooking([FromBody] Request request) { response = new Response(); int result = 0; try { using (var model = new HOSTING_MANAGEREntities()) { model.Configuration.ProxyCreationEnabled = false; if (request.Session > 0 && request.User > 0 && request.Data != null) { result = DbConection.InsertBooking(JsonConvert.DeserializeObject <RIDER>(request.Data.ToString())); } if (result == 0) { response.CodeError = 200; response.Message = "OK"; response.Data = result; } else { response.CodeError = 100; response.Message = "No se logro insertar el log"; response.Data = false; } } } catch (Exception ex) { response.CodeError = 300; response.Message = "Unexpected Error" + ex.ToString(); response.Data = false; } return(Ok(response)); }