예제 #1
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();
            };
        }