incorrect SQL code generation
Posted: Tue 20 Jul 2010 15:34
Hello guys.
I work with dotConnect for MySQL and found a problem.
I write this code
and have SQL:
There hasn't sorting by the field "email" before pagination
Please take me answer ASAP.
Thanks.
I work with dotConnect for MySQL and found a problem.
I write this code
Code: Select all
context.Users
.Where(u => u.FirstName == "D")
.OrderBy(u => u.Email)
.Skip(100).Take(200)
.Where(u => u.LastName == "A").OrderBy(u => u.Password)
.ToList()
Code: Select all
SELECT * FROM
( SELECT * FROM test3.users AS Extent1
WHERE 'D' = Extent1.firstName
limit 100,200
) AS Limit1
WHERE 'A' = Limit1.lastName
ORDER BY Limit1.`password` ASC
Please take me answer ASAP.
Thanks.