public static List <GroupData> GetAll() { using (AddressBookDb db = new AddressBookDb()) { return((from g in db.Groups select g).ToList()); } }
public static List <UserData> GetAll() { using (AddressBookDb db = new AddressBookDb()) { return((from c in db.User.Where(x => x.Deprecated == "0000-00-00 00:00:00") select c).ToList()); } }
public List <UserData> GetContacts() { using (AddressBookDb db = new AddressBookDb()) { return((from c in db.User from gcr in db.GCR.Where(p => p.GroupId == Id && p.ContactId == c.Id && c.Deprecated == "0000-00-00 00:00:00") select c).Distinct().ToList()); } }