Пример #1
0
 public IEnumerable <sp_bookcar_search_v3_Result> search(bookCarModel 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_bookcar_search_v3_Result> result = context.sp_bookcar_search_v3(value.car_type_from, value.car_type_to, value.car_license_from, value.car_license_to, value.date_from, value.date_to, value.car_reason_from, value.car_reason_to, value.status_from, value.status_to, userId).AsEnumerable();
         return(result);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }