Beispiel #1
0
        public static void InsertCustomer(Customer cust)
        {
            var myDB = new CustomerDBEntities();

            myDB.Customers.Add(cust);
            myDB.SaveChanges();
        }
Beispiel #2
0
        public static IEnumerable <Customer> GetCustomers()
        {
            var myDB  = new CustomerDBEntities();
            var query = from cust in myDB.Customers
                        select cust;

            return(query.ToList());
        }