EntityFramework6.Npgsql icon indicating copy to clipboard operation
EntityFramework6.Npgsql copied to clipboard

Translate range operators

Open jamiewinder opened this issue 8 years ago • 2 comments

How would I make use of the range operators in PostgreSQL when querying using Entity Framework? The closest I've seen are the static functions of NsgsqlTextFunctions (e.g. QueryContains), but these seem to only apply the operators to strings, not to ranges (or any other type than might using these operators for that matter)

jamiewinder avatar Nov 29 '17 21:11 jamiewinder

Entity Framework 6 is very limited with respect to exotic features that only exist in some particular databases. If you use that framework you need to stick to the basic comparison operators.

Emill avatar Nov 29 '17 22:11 Emill

It may be possible to create static functions (such as the ones in NpgsqlTextFunctions) which would be translated to the appropriate PostgreSQL operators. While this is definitely possible in EF Core, I'm not sure if EF6 allows function->operator translation. In any case this isn't implemented at the moment.

roji avatar Nov 30 '17 05:11 roji