public IHttpActionResult GetBooking(BookingModel model) { try { var UserId = ((ClaimsIdentity)User.Identity).Claims.FirstOrDefault(c => c.Type.Equals(ClaimTypes.NameIdentifier)).Value; var RefType = ((ClaimsIdentity)User.Identity).Claims.FirstOrDefault(c => c.Type.Equals(ClaimTypes.Name)).Value; BookingDL obj = new BookingDL(); BookingModel list = obj.GetBooking(Convert.ToInt32(UserId), Convert.ToInt32(RefType), model.BookingID); list.success = true; list.message = "Get booking details Successfully"; list.code = 200; return(Ok(list)); } catch (Exception ex) { responseData.message = ex.Message != null?ex.Message.ToString() : "server error"; return(Ok(responseData)); } }