public IEnumerable<Contact> GetAllContacts(OrderByFieldName? sortBy = OrderByFieldName.Id)
        {
            IEnumerable<Contact> contacts = contactRepository.ReadAllContacts();

            if (sortBy == OrderByFieldName.Id)
            {
                return contacts.OrderBy(c => c.ContactId);
            } else//Need to add an extra if or change to switch when adding extra OrderByFieldNames
            {
                return contacts.OrderBy(c => c.Name);
            }
        }
示例#2
0
 public IEnumerable<Contact> GetAllContacts(OrderByFieldName sortBy = OrderByFieldName.ID)
 {
     // geen idee wachten op oplossing.
       return contactRepository.ReadAllContacts();
 }
 public IEnumerable<Contact> GetAllContacts(OrderByFieldName sortBy = OrderByFieldName.ID)
 {
     //
       return contactRepository.ReadAllContacts();
 }
示例#4
0
 public IEnumerable <Contact> GetAllContacts(OrderByFieldName sortBy = OrderByFieldName.ID)
 {
     // geen idee wachten op oplossing.
     return(contactRepository.ReadAllContacts());
 }