Exemple #1
0
 public static List <DataGroup> GetAllGroup()
 {
     using (AddressBookDB db = new AddressBookDB())
     {
         return((from g in db.Groups select g).ToList());
     }
 }
Exemple #2
0
 public static List <DataNewContact> GetAllContact()
 {
     using (AddressBookDB db = new AddressBookDB())
     {
         return((from c in db.Contacts.Where(x => x.Deprecated == "0000-00-00 00:00:00") select c).ToList());
     }
 }
Exemple #3
0
 public List <DataNewContact> GetContactInGroup()
 {
     using (AddressBookDB db = new AddressBookDB())
     {
         return((from c in db.Contacts
                 from gcr in db.GCR.Where(p => p.GroupId == Id && p.ContactId == c.Id)
                 select c).Distinct().ToList());
     }
 }