public static List <GroupData> GetAll() { using (AddressbookDB dB = new AddressbookDB()) { return((from g in dB.Groups select g).ToList()); } }
public static List <ContactData> GetAll() { using (AddressbookDB dB = new AddressbookDB()) { return((from c in dB.Contacts.Where(c => c.Deprecated == "0000-00-00 00:00:00") select c).ToList()); } }
public List <ContactData> GetContacts() { using (AddressbookDB dB = new AddressbookDB()) { return((from c in dB.Contacts from grc in dB.GCR.Where(p => p.GroupId == Id && p.ContactId == c.Id && c.Deprecated == "0000-00-00 00:00:00") select c).Distinct().ToList()); } }