Here is a simple project based on the Poco class called Task :
class Program { static void Main(string[] args) { using (MyDbContext ctx = new MyDbContext()) {
What I want to do is to query the dbset context by including the derived ShouldUpdate property in the where ShouldUpdate .
"The first query works fine" (I can't write it on one line, but that doesn't matter).
As you know, we get a NotSupportedException in the “second query” with the following message: The specified member of the “ShouldUpdate” type is not supported in LINQ to Entities. Only initializers, entities, and entity navigation properties are supported.
That's right, and I can understand why this happens, but I need to encapsulate the received information inside the Task object so that I can display the property in the grid or use it anywhere without duplicating the logic behind it.
Is there a clever technique for this?
NB: What is the technical name of the ShouldUplate property? received? calculated? calculated?
source share