private void OnProductUpdated(ProductsDetailViewModel source, Product product) { var contactInList = Products.Single(c => c.Id == product.Id); contactInList.Id = product.Id; contactInList.ProductName = product.Product_Name; contactInList.ProductDescription = product.Product_Description; contactInList.Prix = product.Prix; }
private void OnProductAdded(ProductsDetailViewModel source, Product product) { Products.Add(new ProductViewModel(product)); }