public messageModel update(book_room_configModel value) { messageModel result = new messageModel(); try { using (var context = new StandardCanEntities()) { if (String.IsNullOrEmpty(value.user_id)) { throw new Exception("Unauthorized Access"); } var userId = JwtHelper.GetUserIdFromToken(value.user_id); if (String.IsNullOrEmpty(userId)) { throw new Exception("Unauthorized Access"); } int ret = context.sp_cancelRoom_update(value.id, value.timeconfig); } result.status = "S"; result.message = ""; } catch (Exception ex) { result.status = "E"; result.message = ex.Message.ToString(); } return(result); }