c# - Lambda overload for Skip/Take Missing -


I was running a few simple test codes to see the effect of the constant in linq queries and gave me a

P>

Lambda surcharges have been mentioned specifically to leave / carry, although I can not seem to find it.

From Section 4.2:

P> "Especially note that while leaving paging and moving, EF6 has a lambda overload in these methods that effectively performs the cached query The plan makes the reusable because EF can capture these passes in the variable passed and translate them into SQLparameters. "

They comply with this code sample:

  var customer = context. Customer Orderbie (c = & gt; c.LastName); {Var currentCustomer = customers.Skip ((= =) => i <) For First IrDefault (); (  

My test code:

 for  (int i = 0; i & lt; 100; i ++) {var result = DC Products // (P = & gt; P. Name). Orderbird (p = & gt; p. Name). Skip ((=) = & gt; i. Olilist (); }   

Error: Lambda expression can not be converted to 'int' because it is not a representative type

I failed, or is there somewhere missing with the overloaded extension method? I'm at EF 6.1.1.

The extension method you are looking for is "". This is in the System.Data.Entity namespace in the EntityFramework assembly.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -