When using "this" in LINQ: "The operands for operator 'Equal' do not match the parameters of method 'op_Equality'."
Posted: Wed 28 Jun 2017 11:57
The following code in my Blog entity:
throws System.InvalidOperationException: 'The operands for operator 'Equal' do not match the parameters of method 'op_Equality'.'
Code: Select all
foreach (var x in Ctx.Posts.Where(z => z.Blog == this)) {
}