public ProductsListViewModel(ProductsSearchViewModel productsSearchViewModel,
                              ProductAddEditViewModel productAddEditViewModel)
     : base(productsSearchViewModel, productAddEditViewModel)
 {
     ListingIncludes = new Expression <Func <Product, object> >[]
     {
         p => p.Category,
         p => p.Supplier
     };
 }
Ejemplo n.º 2
0
        public ProductsListViewModel(ProductsSearchViewModel productsSearchViewModel,
                                     ProductAddEditViewModel productAddEditViewModel, ICategoryService categoryService, ISuppliersService suppliersService)
            : base(productsSearchViewModel, productAddEditViewModel)
        {
            ListingIncludes = new Expression <Func <Product, object> >[]
            {
                p => p.Category,
                p => p.Supplier
            };

            PreAddEditDelegate = (type) =>
            {
                productAddEditViewModel.Categories = categoryService.GetALL();
                productAddEditViewModel.Suppliers  = suppliersService.GetALL();
            };
        }