Пример #1
0
 public void GetSingleContact()
 {
     using (ILoggerFactory logFact = new LoggerFactory())
     {
         using (var db = createNewDataContextInstance())
         {
             IContactService crsrv = new ContactDBService(db, logFact);
             Contact         ct    = crsrv.GetByID(1);
             ct.UpdateName2("Test Name 2");
             crsrv.Update(ct);
         }
     }
 }
Пример #2
0
 public void AddAddress()
 {
     using (ILoggerFactory logFact = new LoggerFactory())
     {
         using (var db = createNewDataContextInstance())
         {
             IContactService crsrv = new ContactDBService(db, logFact);
             Contact         ct    = crsrv.ListByName(contactName, true).FirstOrDefault();
             ct.AddAddress("Home", "52D rue des Crets", "74200 Allinges");
             crsrv.Update(ct);
         }
     }
 }