Ejemplo n.º 1
0
        public IViewComponentResult Invoke()
        {
            var res    = repository.GetAll().FirstOrDefault();
            var number = String.Format("{0:(###) ###-####}", res.PhoneNumber);

            if (res != null)
            {
                var mainhede = new MainPersonelContextModel();
                mainhede.PersonName            = res.PersonName;
                mainhede.PersonWorkInstructure = res.PersonWorkInstructure;
                mainhede.Age                      = res.Age;
                mainhede.PhoneNumber              = res.PhoneNumber;
                mainhede.Email                    = res.Email;
                mainhede.PersonImage              = res.PersonImage;
                mainhede.Adress                   = res.Adress;
                mainhede.HelloHeaderDescription   = res.HelloHeaderDescription;
                mainhede.HelloSectionDescription  = res.HelloSectionDescription;
                mainhede.ResumeHeaderDescription  = res.ResumeHeaderDescription;
                mainhede.ResumeSectionDescription = res.ResumeSectionDescription;
                mainhede.GithubLink               = res.GithubLink;
                mainhede.LinkedikLink             = res.LinkedikLink;
                return(View(mainhede));
            }
            else
            {
                return(View());
            }
        }
Ejemplo n.º 2
0
        public IViewComponentResult Invoke()
        {
            var res = repository.GetAll().FirstOrDefault();

            if (res != null)
            {
                var contact = new ContactSectionModel();
                contact.PhoneNumber  = res.PhoneNumber;
                contact.Skype        = res.Skype;
                contact.Email        = res.Email;
                contact.LinkedikLink = res.LinkedikLink;
                contact.GithubLink   = res.GithubLink;
                return(View(contact));
            }
            else
            {
                return(View());
            }
        }