Try .NET /elinq/
Powered by Try .NET

SQL Server OFFSET FETCH

OFFSET and FETCH are fully supported in ELINQ:

var query = DbContext.Products.Query((Products products) =>
{
    var result = SELECT(products);
    FROM(products);
    ORDER(BY(products.ListPrice), BY(products.ProductName));
    OFFSET(10).ROWS().FETCH_NEXT(10).ROWS_ONLY();

    return result;
});

foreach (var product in query)
    Console.WriteLine((product.ProductName, product.ListPrice));

yet we think that in the outer context it's preferrable to use Linq's capabilities for ordering and offsetting.


< BACK | HOME