The linq Last method throws a exception

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
ashlar64
Posts: 75
Joined: Thu 04 May 2006 18:56

The linq Last method throws a exception

Post by ashlar64 » Tue 09 Jun 2015 15:32

Hello,

This line of code works fine:
var v = context.Jobs.First();

This line of code throws a exception:
var v = context.Jobs.Last();

The exception is:
"The query operator 'Last' is not supported."

I assume this is a bug?

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: The linq Last method throws a exception

Post by MariiaI » Wed 10 Jun 2015 10:09

"The query operator 'Last' is not supported."
This is an expected error due to the fact that it is not supported in LinqConnect, as well as in Microsoft LINQ to SQL.
A similar issues and solutions have been discussed here:
http://forums.devart.com/viewtopic.php?t=15796
http://stackoverflow.com/questions/1262 ... linqs-last
http://stackoverflow.com/questions/7253 ... -supported
http://stackoverflow.com/questions/3476 ... ble-object

If you have any further questions regarding working with LinqConnect, feel free to contact us.

Post Reply