The linq expression is:
var query = from p in _db.LogProjects
      where p.Well == well
      select p;
( Well is a user class )

An exception will be thrown:
Unable to create a constant value of type 'Closure type'. Only primitive types (for instance Int32, String and Guid) are supported in this context.

So, you can change the linq expression to:
var query = from p in _db.LogProjects
      where p.Well.WellID == well.WellID
      select p;

reference:
 ADO.NET Entity Framework Comparison Frustration
Entity Framework Comparison Frustration: Explained

相关文章:

  • 2021-08-01
  • 2021-08-20
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2021-06-20
  • 2022-02-11
猜你喜欢
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-15
  • 2022-02-04
相关资源
相似解决方案