开发者

Entity framework Making use of linq to entities?

开发者 https://www.devze.com 2023-02-16 08:36 出处:网络
I have heard abo开发者_如何学Pythonut linq to entities . Is entity framework Making use of linq to entities?LINQ to Entities is one of the ways of querying in Entity Framework.

I have heard abo开发者_如何学Pythonut linq to entities . Is entity framework Making use of linq to entities?


LINQ to Entities is one of the ways of querying in Entity Framework.

var user = from u in context.Users
           where u.Id = userId
           select u;

and

var user = context.Users.Where(u => u.Id == userId);

Are both examples of LINQ to Entities. The context variable is the Entity Framework ObjectContext.


LINQ to Entities is part of the Entity Framework.


better you read

http://msdn.microsoft.com/en-us/library/aa697427(v=vs.80).aspx

0

精彩评论

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