尝试在VS中运行我的项目时,请始终收到此错误。似乎是类型集成问题之类的。非常感谢您的帮助,因为我有些困惑。 上下文:这是用于图书馆出租系统
整个方法引发错误。
public ActionResult Index(int? id)
{
var viewModel = new BookAuthorViewModel();
viewModel.BookList = _context.Books
.Include(i => i.BookAuthors)
.ThenInclude(i => i.Author)
.Include(i => i.BookCategories)
.ThenInclude(i => i.Category)
.Include(i => i.BookKeywords)
.ThenInclude(i => i.Keyword)
.AsNoTracking()
.OrderBy(i => i.Title)
.ToList();