コード例 #1
0
 public void Update()
 {
     using (var contactTypeRepository = new ContactTypeRepostory())
     {
         var baz = contactTypeRepository.GetById(2);
         var originalDescription = baz.Description;
         baz.Description = "Test Value";
         contactTypeRepository.Submit();
         baz.Description = originalDescription;
         contactTypeRepository.Submit();
     }
 }
コード例 #2
0
 public void TestMethod1()
 {
     using(var contactTypeRepository = new ContactTypeRepostory())
     {
         var bar = contactTypeRepository.GetAll();
         var baz = contactTypeRepository.GetById(2);
         var newType = new ContactType
         {
             Description = "Fax"
         };
         contactTypeRepository.Add(newType);
         contactTypeRepository.Submit();
         contactTypeRepository.Delete(newType);
         contactTypeRepository.Submit();
     }
 }