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); } }
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(); }
public IEnumerable <Contact> GetAllContacts(OrderByFieldName sortBy = OrderByFieldName.ID) { // geen idee wachten op oplossing. return(contactRepository.ReadAllContacts()); }