public virtual IEnumerable <Contact> GetAll() { _logger.LogInformation("Get all contact information"); var contactFromRepo = _contactRepo.GetAll(); if (contactFromRepo.Any()) { return(_mapper.Map <IEnumerable <Contact> >(contactFromRepo)); } return(null); }
static void GetAll(IContactRepo repo) { var contacts = repo.GetAll(); Debug.Assert(contacts.Count > 0); Console.WriteLine(contacts.Serialize()); }
public IEnumerable <ContactDTO> GetContact() { return(_contactRepo.GetAll()); }
// GET api/values public IEnumerable <ContactBasicInfo> Get() { var result = _contactRepo.GetAll(); return(result); }