Esempio n. 1
0
        public IActionResult SaveBlog(BlogAddVM input)
        {
            var blog = _mapper.Map <Blog>(input);

            _blogService.Insert(blog);

            return(RedirectToAction("Details", "User", new { id = input.appUserId }));
        }
Esempio n. 2
0
        public IActionResult Insert(string id)
        {
            var model = new BlogAddVM
            {
                PublishedDate = DateTime.Now,
                appUserId     = id
            };

            return(PartialView(model));
        }