New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filter on day of week #624
Comments
There is no such support in Entity Framework.
And in your expression:
DbFunctions is in the namespace System.Data.Entity. |
I tried this one too, but it returns an error in the generated sql. c#: Generated sql: error when executing the query: Solution: The where clause generates also 2 times the same expression where 1 should be enough. How can I resolve this ? |
Starting from version 9.4, PostgreSQL supports 2 implementations of date_trunc() http://www.postgresql.org/docs/9.4/static/functions-datetime.html
I assume this is not (yet) supported in npgsql 2.. PC |
In Npgsql 3, we prepend "timestamp" to the string so it should work there.
|
Npgsql 3 has been released so this should be resolved. Please reopen if the problem persists. |
I try to filter a datetime field on the day of the week.
For example (if I only want mondays):
DayOfWeek d = DayOfWeek.Monday;
filter.AddExpression(z => z.mydatetimefield.DayOfWeek == d);
But this result in the following error:
The specified type member 'DayOfWeek' is not supported in LINQ to Entities
Is there already a solution for filtering on day of week ? I use EF 6.1.2 and Npgsql 2.2.4.1.
Thx.
The text was updated successfully, but these errors were encountered: