Пример #1
0
 /**
  * Method to get contact information
  * by an id, including both the list
  * of sales supplies and the list of
  * buying offers that are made with
  * these contact informations.
  */
 public ContactInfo GetContactById(int id)
 {
     return(ContactInfoes
            .Where(c => c.Id == id)
            .Include(c => c.SalesSupplies)
            .Include(c => c.BuyingOffers)
            .FirstOrDefault());
 }
Пример #2
0
 /**
  * Method to get contact information
  * by the login inputs, name, number
  * and email. It also retrieves both
  * the list of sales supplies and the
  * list of buying offers that are made
  * with these contact informations.
  */
 public ContactInfo GetContactInfoByStrings(string name, string number, string email)
 {
     return(ContactInfoes
            .Where(c => c.Name == name && c.Number == number && c.Email == email)
            .Include(c => c.SalesSupplies)
            .Include(c => c.BuyingOffers)
            .FirstOrDefault());
 }