public ActionResult Create(BlogEntry entry = null) { if (entry.CRUD) { entry.CreatedBy = "David Harvey"; entry.DateCreated = DateTime.Now; BlogService.Add(entry); return new RedirectResult("~//Home/Blogs"); } else { ServiceManager myManager = new ServiceManager(); return View(myManager.BlogEntry); } }
public ActionResult Update_List() { ServiceManager myManager = new ServiceManager(); IBlogView myBlogView = new BlogView(); myBlogView.Entries = BlogService.GetRows(null, IMAGE_PATH).OrderByDescending(p => p.DateCreated); return View(myBlogView); }