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

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

            return(result);
        }