static void Main(string[] args) { RestaurantDataStore str = new RestaurantDataStore("Conn"); Product p = str.Products.FindById(1); p.Name = "skldjslkdjkldslkdjskldjslkdjslkdjlskdjskld"; str.Products.Update(p); Console.ReadLine(); }
public static void Main(string[] args) { RestaurantDataStore ctx = new RestaurantDataStore("DBConnection"); Product product = new Product { Name = "Ogurec", Price = 40.0M, Unit = "kg" }; ctx.Products.Create(product); Console.ReadKey(); }
public ProductService(RestaurantDataStore dataStore) { _dataStore = dataStore; }