Hi can any one just correct me the error occur when running the grid values using this below code:
Error: "An unhandled exception occurred while processing the request.
InvalidOperationException: Lambda expression used inside Include is not valid."
code: public IEnumerable GetAll()
{
return _context.LibraryAssets
.Include(asset => asset.Status)
.Include(asset => asset.Location);
}
in view side:
@foreach (var asset in Model.Assets)
{

@asset.Title
@asset.AuthorOrDirector
@asset.DeweyCallNumber
}
Hi can any one just correct me the error occur when running the grid values using this below code:
Error: "An unhandled exception occurred while processing the request.
InvalidOperationException: Lambda expression used inside Include is not valid."
code: public IEnumerable GetAll()
{
return _context.LibraryAssets
.Include(asset => asset.Status)
.Include(asset => asset.Location);
}
in view side:
@foreach (var asset in Model.Assets) {
@asset.Title @asset.AuthorOrDirector @asset.DeweyCallNumber }