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