static void Main(string[] args) { var productFinder = new ProductFinder(ConnectionString); var product = productFinder.FindById(1); product.Name = "New name"; product.Update(); var product2 = productFinder.FindById(1); Console.WriteLine($"Product name: {product2.Name}"); }
static void Main(string[] args) { var productFinder = new ProductFinder(ConnectionString); var product = productFinder.FindById(1); Console.WriteLine($"Product price: {product.Price}, after discount: {product.PriceWithDiscount(10.0)}, USD: {product.PriceConvertToUsd()}"); }