Hi,
Can I use System.Data.Objects.EntityFunctions.AddDays or similar with the Devart PostgreSql data provider. I can't find the function in Devart.Data.PostgreSql.Entity.
I want to do something like this:
DbContext.Entity.Where(x => x.dateColumn.AddDays(x.lengthColumn))
or
DbContext.Entity.Where(x => PgSqlFunctions.AddDays(x.dateColumn ,x.lengthColumn))
Thanks,
Simon
Entity Framework AddDays
Re: Entity Framework AddDays
The DateTime.AddDays method is not supported in LINQ to Entities. You can use the EntityFunctions.AddDays method for this (System.Data.Entity.DbFunctions.AddDays for EF6).
Please refer to http://blog.devart.com/entity-framework ... tions.html, the "Date and Time Canonical Function" section (the EntityFunctions.AddDays is supported in dotConnect for PostgreSQL).
Some useful information is also available here:
http://stackoverflow.com/questions/4146 ... k-datetime
If you encounter any further issues with this, feel free to contact us.
Please refer to http://blog.devart.com/entity-framework ... tions.html, the "Date and Time Canonical Function" section (the EntityFunctions.AddDays is supported in dotConnect for PostgreSQL).
Some useful information is also available here:
http://stackoverflow.com/questions/4146 ... k-datetime
If you encounter any further issues with this, feel free to contact us.