Esempio n. 1
0
        public void AddNewBlogpost(BlogPostInput blogPostInput)
        {
            var BlogPost = new Models.BlogPost
            {
                Title = blogPostInput.Title,
                Url   = blogPostInput.Url
            };

            applicationContext.Add(BlogPost);
            applicationContext.SaveChanges();
        }
 public IActionResult AddNewBlogPost(BlogPostInput blogPostInput)
 {
     postService.AddNewBlogpost(blogPostInput);
     return(Redirect("/"));
 }