Beispiel #1
0
 private void loadContactAddressTypes()
 {
     using (var context = new Entities())
     {
         var AddressTypes = new Repository.PersonRepository.AddressType(context);
         var addressTypes = AddressTypes.addressTypes().ToList();
         this.personAddressType.DataSource = addressTypes;
     }
     this.personAddressType.DisplayMember = "Name";
     this.personAddressType.ValueMember   = "AddressTypeID";
 }
Beispiel #2
0
        public void getIEnumberableOfAddressType()
        {
            var context = new Entities();

            Repository.PersonRepository.AddressType addressType = new Repository.PersonRepository.AddressType(context);
            var items = addressType.addressTypes().ToList();

            //returns IEnumberable<AdventureWorks.Model.Person> and prints values in model.
            foreach (var item in items)
            {
                if (!item.Equals("Billing"))
                {
                    continue;
                }
                Assert.AreEqual("Billing", item.Name);
            }
        }