public ProductListViewModel(iProductRepository productRepository)
        {
            _productRepository = productRepository;

            EditProductCommand   = new RelayCommand <Product>(OnEditProduct);
            DeleteProductCommand = new RelayCommand <Product>(OnDeleteProduct);
        }
Example #2
0
        public AddEditProductViewModel(iProductRepository productRepository)
        {
            _productRepository = productRepository;

            CancelCommand = new RelayCommand(OnCancel);
            SaveCommand   = new RelayCommand(OnSave, CanSave);
        }
 public ProductEditSimpleMVVMViewModel()
 {
     _productRepository =
         new EFProductRepository();
     SaveCommand =
         new RelayCommand(OnSave);
 }
Example #4
0
 public ProductsService(iProductRepository productsRepo, IMapper autoMapper)
 {
     _productsRepo = productsRepo;
     _autoMapper   = autoMapper;
 }
Example #5
0
 static ProductController()
 {
     //Future Use: Can add build parameters here to specify alternate repositories.
     _context = new AdventureWorksDAL.Repositories.ProductRepo();
 }
Example #6
0
 public ProductRditDirctView()
 {
     InitializeComponent();
     _productRepository = new FfProductRepository();
 }
Example #7
0
 public ProductEditDatabindView()
 {
     _productRepostory = new EFProductRepository();
     InitializeComponent();
 }
 public ProductsController(iProductRepository repo)
 {
     _repo = repo;
 }