コード例 #1
0
 public void Delete()
 {
     if (VendorList.Contains(VendorId))
     {
         VendorList.GetVendorList().Remove(this);
     }
 }
コード例 #2
0
 public void Save()
 {
     if (!VendorList.Contains(VendorId))
     {
         VendorList.GetVendorList().Add(this);
         IsNew = false;
     }
 }
コード例 #3
0
        private static void BuildInstance()
        {
            _instance = new VendorList();
            new Vendor
            {
                FirstName = "Ella",
                LastName  = "Fitzgerald",
                Town      = "Newport News",
                State     = States.VA
            }.Save();

            new Vendor
            {
                FirstName = "Louis",
                LastName  = "Armstrong",
                Town      = "New Orleans",
                State     = States.LA
            }.Save();
        }