摘要:
public ActionResult Index(){var albums = storeDB.Albums.Include("Genre").Include("Artist");return View(albums.ToList());}这里写成public ActionResult Index(){var albums = storeDB.Albums;return View(albums.ToList());}运行也一样,显示结果也一样, 也会包含genre和artist不知道两者有什么具体的区别?storeDB.Albums.Include(& 阅读全文
摘要:
ActionResult is an abstract class that can have several subtypes:a) ViewResult - Renders a specifed view to the response streamb) PartialViewResult - Renders a specifed partial view to the response streamc) EmptyResult - An empty response is returnedd) RedirectResult - Performs an HTTP redirection t 阅读全文