Пример #1
0
        public IList <ProductCategory> GetAll(ProductCategorySearchFilter filter)
        {
            Expression <Func <ProductCategory, bool> > conditions = x => true;

            if (filter != null)
            {
                if (!string.IsNullOrWhiteSpace(filter.Name))
                {
                    conditions = x => x.Name.Contains(filter.Name);
                }
            }
            return(_productCategoryRepo.Get(conditions: conditions, orderBy: x => x.OrderByDescending(u => u.ProductCategoryId)));
        }
Пример #2
0
 public virtual ActionResult Manage(ProductCategorySearchFilter filter)
 {
     GetAddPartial();
     ViewBag.EntityPartial = ControllerExtension.RenderViewToString(this, "Partials/_Entity", new ProductCategory());
     return(View(_productCatSrv.GetAll(filter)));
 }