예제 #1
0
        public IEnumerable <LotModel> GetLotsBySearch(string category, string subcategory, string keyword)
        {
            if (category == null)
            {
                category = "";
            }
            if (subcategory == null)
            {
                subcategory = "";
            }
            if (keyword == null)
            {
                keyword = "";
            }
            if (!string.IsNullOrWhiteSpace(category) || !string.IsNullOrWhiteSpace(subcategory) || !string.IsNullOrWhiteSpace(keyword))
            {
                IEnumerable <Lot>      tempLots = LOperations.GetBySearch(category, subcategory, keyword);
                IEnumerable <LotModel> lots     = Mapper.Map <IEnumerable <Lot>, IEnumerable <LotModel> >(tempLots);
                return(lots);
            }
            IEnumerable <Lot>      tempCLots = LOperations.GetСonfirmedLots();
            IEnumerable <LotModel> clots     = Mapper.Map <IEnumerable <Lot>, IEnumerable <LotModel> >(tempCLots);

            return(clots);
        }
예제 #2
0
 public IEnumerable <Lot> GetLotsBySearch(string category, string subcategory, string keyword)
 {
     if (category == null)
     {
         category = "";
     }
     if (subcategory == null)
     {
         subcategory = "";
     }
     if (keyword == null)
     {
         keyword = "";
     }
     if (!string.IsNullOrWhiteSpace(category) || !string.IsNullOrWhiteSpace(subcategory) || !string.IsNullOrWhiteSpace(keyword))
     {
         return(LOperations.GetBySearch(category, subcategory, keyword));
     }
     return(LOperations.GetСonfirmedLots());
 }