partial void OnSupplierChanging(Supplier newValue, Supplier oldValue);
partial void OnSupplierChanged(Supplier value);
public void CreateSupplier() { Stopwatch watch = Stopwatch.StartNew(); var supplier = new Supplier(); supplier.Name = NAME; supplier.Status = "AB"; supplier.Addr1 = "One Way"; supplier.Addr2 = "Two Way"; supplier.City = "Dallas"; supplier.State = "TX"; supplier.Zip = "90210"; supplier.Phone = "555-555-5555"; try { using (var context = new PetshopDataContext()) { context.Supplier.InsertOnSubmit(supplier); context.SubmitChanges(); context.Supplier.Detach(supplier); _supplierId = supplier.SuppId; } } catch (Exception ex) { Assert.Fail(ex.Message); } Assert.IsTrue(true); Console.WriteLine("Time: {0} ms", watch.ElapsedMilliseconds); }