Incomplete class properties not available through LINQ query bound to GridView

I have added a partial class to the one generated by the Entity Framework. I wanted to add a computed field that I could bind to my GridView. However, when I try to access a new property, I get an error that this is a restriction on the Entity Framework.

Is there any work for this?

+3
source share
1 answer

Without looking at your code, it will not be possible to correctly diagnose your problem. However, I have a hunch ...

. GridView , GridView , , .

... , . Entity ORM , (, SQL Server). , EF SQL, , " , SQL"

, , .

UPDATE:

, :

1.) . , .

2.) , () , LINQ to Object, , . - :

var query = from o in Context.Orders
            where o.Price > 100
            select o;

var orders = from order in query.ToList() // Force query to execute
             where order.ComputedColumn == 42
             select order;

, , , .

+8

Source: https://habr.com/ru/post/1762279/


All Articles