Per-operation collation in Entity Framework Core

ef-core-2.0 entity-framework entity-framework-core postgresql

Question

I have a database which uses the default C collation. This database is for an app that will be used by both English and French users, so I can't set a specific collation at design-time on the database itself, but I must do it on a per-operation basis, based on the locale of the current thread.

PostgreSQL has support for this:

SELECT * 
FROM my_table 
ORDER BY y COLLATE "fr_FR";

I know we can do it at design-time in EF Core code-first Migrations, but is there any way to do it on a per-operation basis?

1
1
12/10/2017 6:09:20 PM

Popular Answer

This seems to be currently unsupported, as there is an open feature request regarding this in the entity framework core github repository:

https://github.com/aspnet/EntityFrameworkCore/issues/8813

0
8/21/2018 3:14:31 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow