Esempio n. 1
0
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
       context = new RisusContext();
       context.Customers.Load();
       customerBindingSource.DataSource = context.Customers.Local;
 }
Esempio n. 2
0
 public void TestNewCustomer()
 {
     using (var db = new RisusContext())
       {
     Customer customer = new Customer()
     {
       Id = 1,
       DateOfBirth = new DateTime(1975, 4, 18),
       DateOfMarriage = new DateTime(2008, 5, 11)
     };
     customer.Name = "Tekin";
     db.Customers.Add(customer);
     db.SaveChanges();
       }
 }