Entity framework linq - which should I learn based on a query-based method?

Just go to Entity Framework and Linq for EF. I'm not sure which of the two query methods should I focus on based on methods or queries?

Is there an obvious choice as to which one is easier to use for both simple and more complex queries, therefore there should be one that I'm focusing on? Assuming I'm using VS2010, is there a method-based method in terms of having additional development time checks / hints from the IDE to simplify the task before starting the application?

thank

+3
source share
2 answers

The syntax of the method is more complete; you cannot make request syntax without connecting a method here or there inside. In addition, for some very simple queries, the method syntax may look more concise, IMO.

On the other hand, the query syntax may seem to more naturally describe a query to someone familiar with SQL.

I always believed that I used the method syntax exclusively when I started to learn Linq in general. But I also often lose queries on query syntax queries. Perhaps you could focus on the Method syntax because of the completeness and familiarity factor (if they are valuable to you at all), and maybe you will find that the query syntax just “comes to you” when you go too.

+4
source

I , , , , , , , , , .

+1

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


All Articles