Пример #1
0
        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();
        }
Пример #2
0
        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();
        }
Пример #3
0
 public ProductService(RestaurantDataStore dataStore)
 {
     _dataStore = dataStore;
 }