public IEnumerable <sp_bookroom_search_v3_Result> search_all_calendar(bookRoomModel value) { try { 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"); } StandardCanEntities context = new StandardCanEntities(); IEnumerable <sp_bookroom_search_v3_Result> result = context.sp_bookroom_search_v3(value.room_from, value.room_to, value.date_from, value.date_to, value.status_from, value.status_to, "all").AsEnumerable(); return(result); } catch (Exception ex) { throw new Exception(ex.Message); } }