开发者

How should I use navigation properties while writing a query using eSQL?

开发者 https://www.devze.com 2022-12-28 05:21 出处:网络
I am trying to write a query using e开发者_Go百科SQL wherein my entity has got navigation properties. I am not able to include these navigation properties in the query, even though in Linq to SQL we h

I am trying to write a query using e开发者_Go百科SQL wherein my entity has got navigation properties. I am not able to include these navigation properties in the query, even though in Linq to SQL we have this (Include method).

How will it be possible in eSQL?


Like so:

string esql = "Select value e from EFEntities.MyDataEntity as e";

ObjectQuery<Data.MyDataEntity> query = c.
    CreateQuery<Data.MyDataEntity>(esql).
    Include("MyNavigationProperty");

List<Data.MyDataEntity> entities = query.ToList();
0

精彩评论

暂无评论...
验证码 换一张
取 消