public RedemptionStoreProductViewModel(RedemptionStoreWindowViewModel viewModel, RedemptionStoreProductModel product) { this.viewModel = viewModel; this.Product = product; this.EditProductCommand = this.CreateCommand(() => { this.viewModel.EditProduct(this); }); this.DeleteProductCommand = this.CreateCommand(async() => { await this.viewModel.DeleteProduct(this); }); }
public RedemptionStoreProductViewModel(RedemptionStoreWindowViewModel viewModel, RedemptionStoreProductModel product) { this.viewModel = viewModel; this.Product = product; this.EditProductCommand = this.CreateCommand((parameter) => { this.viewModel.EditProduct(this); return(Task.FromResult(0)); }); this.DeleteProductCommand = this.CreateCommand(async(parameter) => { await this.viewModel.DeleteProduct(this); }); }