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); } } }
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); } } }