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()); } }
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()); } }
public IEnumerable <BuybackVehicle> Post(int pageSize, int pageNumber, [FromBody] BuybackVehicleQuery queryObject) { return(repositoryService.VehicleRepository.SearchPaged(queryObject, pageSize, pageNumber)); }
public IEnumerable <BuybackVehicle> Post([FromBody] BuybackVehicleQuery queryObject) { return(repositoryService.VehicleRepository.Search(queryObject)); }
public static BuybackVehicleQueryProcessor Instance(BuybackVehicleQuery buybackVehicleQuery) { return(new BuybackVehicleQueryProcessor(buybackVehicleQuery)); }
private BuybackVehicleQueryProcessor(BuybackVehicleQuery buybackVehicleQuery) { this.buybackVehicleQuery = buybackVehicleQuery; }
public IBuybackVehicleQueryProcessor Create(BuybackVehicleQuery buybackVehicleQuery) { return(BuybackVehicleQueryProcessor.Instance(buybackVehicleQuery)); }