public ActionResult <Blog> Post(Blog blog) { _repository.AddBlog(blog); _repository.Save(); return(CreatedAtRoute("GetBlog", new { blogId = blog.BlogId }, blog)); }
public void AddBlog(Blog blog) { _bloggingRepository.AddBlog(blog); }