Beispiel #1
0
        public TamasViewModel GetTamas(int userid)
        {
            About          about   = db.Abouts.Find(userid);
            List <Social>  socials = db.Socials.Where(s => s.UserId == userid).ToList();
            TamasViewModel list    = new TamasViewModel()
            {
                MyPhone = about.PhoneNumber,
                MyEmail = about.Email,
                Socials = socials
            };

            return(list);
        }
Beispiel #2
0
        public IActionResult tamas(TamasViewModel tamasView)
        {
            if (!ModelState.IsValid)
            {
            }
            TamasHa tamas = new TamasHa()
            {
                UserId  = 1,
                name    = tamasView.name,
                Email   = tamasView.Email,
                Phone   = tamasView.Phone,
                Massage = tamasView.Massage
            };

            _service.CreateTamas(tamas);

            ViewBag.success = true;

            return(Redirect("/"));
        }