public IHttpActionResult PutEvent(int?id, EventModel data) { try { if (!id.HasValue) { return(BadRequest()); } var result = oSvc.PutEvent(id.Value, data); return(Ok(result)); } catch (Exception ex) { ExceptionModel exc = oException.Set(ex); return(Ok(exc)); } }