Code: Select all
var query = from e in base.Context.Event
let startTime = e.TimeStart ?? DateTime.Now
select DbFunctions.CreateDateTime(startTime.Year, startTime.Month, startTime.Day, startTime.Hour, startTime.Minute, startTime.Second);
Also the using of OracleFunctions-method will not help:
Code: Select all
var query = from e in base.Context.Event
let startTime = e.TimeStart ?? OracleFunctions.CurrentTimestamp().Value
select DbFunctions.CreateDateTime(startTime.Year, startTime.Month, startTime.Day, startTime.Hour, startTime.Minute, startTime.Second);
I try also other DbFunctions-methods and OracleFunctions-method regarding to datetime but getting all kinds of Oracle-exceptions. Seems to be that these functions are not tested at all.
PS: EntityFramework 6.1.1 / Devart Oracle 8.4.215.0 / Oracle Server 11g (11.2.0.3.0)