I want to create an SQL query with EFCore like below.
FROM "Customers" AS c
where reverse("Phone") LIKE reverse('%#####');
ORDER BY 1
LIMIT @__p_2 OFFSET @__p_1
I'm trying do with LINQ but this code is not working and also I couldn't find reverse method inside EF.Functions
query = query.Where(c => c.Phone.Reverse().ToString() == $"{phone}%");
throws an error
Message": "The LINQ expression 'DbSet\r\n .Where(c => c.Phone\r\n .Reverse().ToString() == __Format_0)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
Is there any way to create reverse function query with PostgreSQL/Npgsql provider for Entity Framework Core.