Exemplo n.º 1
0
        static void Main(string[] args)
        {
            MyRepo repo = new MyRepo();

            Console.WriteLine(repo.GetCustomers().Count());

            foreach (Customers c in repo.GetCustomers())
            {
                Console.WriteLine(c.Orders.Count());
            }
        }
Exemplo n.º 2
0
        public void SaveCustomer()
        {
            Entities en = new data.Entities();

            en.AddToCustomers(new Customers { FirstName = @"Chuck", LastName = @"Norris" });
            en.SaveChanges();

            Console.WriteLine(@"Saved a new record!");

            MyRepo repo = new MyRepo();
        }