The member has no supported translation to SQL. When trying to access a property in my Partial class in the LINQ to SQL statement. Lamda expression?

Your Parent property will be fine in LINQ-to-Objects, but as the message states, it will have no clue what to do with this if it needs to create TSQL. It can't read through your C# code (IL at the time) to infer meaning. At best there may be something you can do with some function that returns an Expression of some form, but it won't be fun to work with Basically, when interacting with the ORM you can only talk in terms of things it already knows about.

You could possibly map a UDF to the data-context and use that, but again - not pretty To work with Expression you'd need to use Expression. Invoke and self-rolled lambdas (when combining them to do interesting things like comparing them to an expected value); it really isn't going to be nice. I could probably get an example together, but frankly I think your DAL/repository should just not use these extra properties, but limit itself to using the ORM properties instead.

Even if it violates a little DRY.

Your . Parent property will be fine in LINQ-to-Objects, but as the message states, it will have no clue what to do with this if it needs to create TSQL. It can't read through your C# code (IL at the time) to infer meaning.At best there may be something you can do with some function that returns an Expression of some form, but it won't be fun to work with.

Basically, when interacting with the ORM you can only talk in terms of things it already knows about. You could possibly map a UDF to the data-context and use that, but again - not pretty.To work with Expression, you'd need to use Expression. Invoke and self-rolled lambdas (when combining them to do interesting things like comparing them to an expected value); it really isn't going to be nice.

I could probably get an example together, but frankly I think your DAL/repository should just not use these extra properties, but limit itself to using the ORM properties instead. Even if it violates a little DRY.

Parent property will be fine in LINQ-to-Objects, but as the message states, it will have no clue what to do with this if it needs to create TSQL. It can't read through your C# code (IL at the time) to infer meaning. At best there may be something you can do with some function that returns an Expression of some form, but it won't be fun to work with.

Basically, when interacting with the ORM you can only talk in terms of things it already knows about. You could possibly map a UDF to the data-context and use that, but again - not pretty. To work with Expression, you'd need to use Expression.

Invoke and self-rolled lambdas (when combining them to do interesting things like comparing them to an expected value); it really isn't going to be nice. I could probably get an example together, but frankly I think your DAL/repository should just not use these extra properties, but limit itself to using the ORM properties instead.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions