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);
        }
Beispiel #2
0
        static void GetAll(IContactRepo repo)
        {
            var contacts = repo.GetAll();

            Debug.Assert(contacts.Count > 0);
            Console.WriteLine(contacts.Serialize());
        }
Beispiel #3
0
 public IEnumerable <ContactDTO> GetContact()
 {
     return(_contactRepo.GetAll());
 }
Beispiel #4
0
        // GET api/values
        public IEnumerable <ContactBasicInfo> Get()
        {
            var result = _contactRepo.GetAll();

            return(result);
        }