Exemplo n.º 1
0
        public async Task <IActionResult> Index()
        {
            var contact = await _contactInfoService.Get(1);

            if (contact.ResultStatus == ResultStatus.Error)
            {
                return(NotFound());
            }
            if (contact.ResultStatus == ResultStatus.Success)
            {
                return(View(contact.Data));
            }
            return(NotFound());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> About()
        {
            var aboutMe = await _aboutMeService.Get(1);

            if (aboutMe.ResultStatus == ResultStatus.Error)
            {
                return(NotFound());
            }
            if (aboutMe.ResultStatus == ResultStatus.Success)
            {
                var contactInfo = await _contactInfoService.Get(1);

                ViewBag.ContactInfo = contactInfo.Data.ContactInfo;
                ViewBag.About       = "active";
                return(View(aboutMe.Data));
            }
            return(NotFound());
        }
Exemplo n.º 3
0
        public ActionResult ShowGoogleMap(int id)
        {
            var contactInformation = _contactInfoService.Get(x => x.Id == id);

            return(View(contactInformation));
        }
Exemplo n.º 4
0
        public async Task <ContactInfoDto> GetContactInfo()
        {
            var info = await _contactInfoService.Get(1);

            return(info.Data);
        }