Пример #1
0
        public ActionResult <IEnumerable <ContactReadDto> > GetAllContacts()
        {
            var contactItems = _repository.GetAllContacts();

            return(Ok(_mapper.Map <IEnumerable <ContactReadDto> >(contactItems)));
        }
 public IActionResult GetAllContacts()
 {
     return(Ok(_repo.GetAllContacts()));
 }
Пример #3
0
        public ViewResult Index()
        {
            var model = _contacts.GetAllContacts();

            return(View(model));
        }