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("/")); }