コード例 #1
0
        public List <BuybackVehicle> Search(BuybackVehicleQuery queryObject)
        {
            WherePredicate = buybackVehicleQueryProcessorFactory.Create(queryObject).ProcessAll();
            var query = FormQuery();

            using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ABS-SQL"].ConnectionString))
            {
                return(connection.Query <BuybackVehicle>(query).ToList());
            }
        }
コード例 #2
0
        public IEnumerable <BuybackVehicle> SearchPaged(BuybackVehicleQuery queryObject, int pageSize, int pageNumber)
        {
            WherePredicate = buybackVehicleQueryProcessorFactory.Create(queryObject).ProcessAll();
            var query = FormQuery(pageNumber, pageSize);

            using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ABS-SQL"].ConnectionString))
            {
                return(connection.Query <BuybackVehicle>(query).ToList());
            }
        }
コード例 #3
0
 public IEnumerable <BuybackVehicle> Post(int pageSize, int pageNumber, [FromBody] BuybackVehicleQuery queryObject)
 {
     return(repositoryService.VehicleRepository.SearchPaged(queryObject, pageSize, pageNumber));
 }
コード例 #4
0
 public IEnumerable <BuybackVehicle> Post([FromBody] BuybackVehicleQuery queryObject)
 {
     return(repositoryService.VehicleRepository.Search(queryObject));
 }
コード例 #5
0
 public static BuybackVehicleQueryProcessor Instance(BuybackVehicleQuery buybackVehicleQuery)
 {
     return(new BuybackVehicleQueryProcessor(buybackVehicleQuery));
 }
コード例 #6
0
 private BuybackVehicleQueryProcessor(BuybackVehicleQuery buybackVehicleQuery)
 {
     this.buybackVehicleQuery = buybackVehicleQuery;
 }
コード例 #7
0
 public IBuybackVehicleQueryProcessor Create(BuybackVehicleQuery buybackVehicleQuery)
 {
     return(BuybackVehicleQueryProcessor.Instance(buybackVehicleQuery));
 }