コード例 #1
0
 public static List <ContactData> GetAll()
 {
     using (AddressBookDB db = new AddressBookDB())
     {
         return((from g in db.Contacts.Where(x => x.Deprecated == "0000-00-00 00:00:00") select g).ToList());
     }
 }
コード例 #2
0
 public static List <GroupData> GetAll()
 {
     using (AddressBookDB db = new AddressBookDB())
     {
         return((from g in db.Groups select g).ToList());
     }
 }
コード例 #3
0
 public List <ContactData> GetContacts()
 {
     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).ToList());
     }
 }
コード例 #4
0
 public List <ContactData> GetContacts()
 {
     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 && c.Deprecated == "0000-00-00 00:00:00")
                 select c).Distinct().ToList());
     }
 }