is there any reason to use entity SQL over Linq?
Entity framework provides at least two ways to query da开发者_如何学编程ta: Entity SQL and Linq?
Linq sounds like a better option.
Any reason one should care about Entity SQL?
I used EntitySQL in order to generate complex condition on the fly without using something like Predicate Builder. But i agree that Linq3Entities is better since you get compile time check on your query.
EDIT
In Entity SQL i can do this:
context.Entities.Where("it.Id IN { 1, 2, 3 }");
with it i build a string to add multiple condition with 'And' and 'Or'
You can also see the multiple post on StackOverflow about this: here and here
or other link Linq-to-SQL vs Linq-to-Entities : Revisited or Choosing LINQ to Entities vs Entity SQL vs. EntityClient
精彩评论