public ActionResult AddBlog(BlogViewModel model) { BlogDto blog = new BlogDto { Author = model.Author }; _service.AddBlog(blog); return RedirectToAction("Index", "Home"); }
public ActionResult AddBlog() { BlogViewModel viewModel = new BlogViewModel(); return View(viewModel); }