Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

This overload of the method 'System.Linq.Queryable.TakeLast' is currently not supported

$
0
0

I have an ASP .Net Core 2.2 Web API using Entity Framework Core. It connects to a MySQL database using the latest version of Pomelo. When I try to execute the Linq function "TakeLast", like this:

var messages = dbContext.Messages
.TakeLast(5)
.ToList();
I get this error:

Exception thrown: 'System.NotSupportedException' in Remotion.Linq.dll

System.NotSupportedException: Could not parse expression 'value(Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[PropWorx.API.Models.Message]).TakeLast(__p_0)': This overload of the method 'System.Linq.Queryable.TakeLast' is currently not supported.

The Ling function "Take" works - but "TakeLast" doesn't. Is this a limitation of MySql? Or Pomelo? Any workaround?

Thanks


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>