Closed ErikEJ closed 8 months ago
It looks like we currently only have GETDATE() and GETUTCDATE(), neither of which gives a DATETIMEOFFSET. We'll likely need to add the SYS... date/time functions for 6.0.
The only alternative I can see currently would be to get DateTimeOffset.Now in .NET and pass the value as a parameter. It might be handy to support this approach for our EFCore provider to work with 5.x versions. Or, we'd have to limit support to VistaDB 6 and later.
Is it possible for the provider to support both approaches and detect the VistaDB provider version to determine which approach to use?
I would prefer 2 seperate provider packages, similar to what I do with Sqlce 3.5 Vs 4.0 (4.0 has paging support).
The way to tell EF Core that datetimeoffset.now must be evaluated on the client is to return Null from the function mapping (for v 5)
Fixed for VistaDB v5 (by forcing client eval)
By the way, I'm working on adding SysDateTime() and SysDateTimeOffset() for a 5.7 release by the end of September. 5.7 will have a new assembly version to signify the support for this, and it will probably be the minimum version for EF Core support.
SELECT [o].[OrderID], [o].[CustomerID], [o].[EmployeeID], [o].[OrderDate] FROM [Orders] AS [o] WHERE [o].[OrderDate] = SYSDATETIMEOFFSET()