Page 1 of 1

Canonical functions in LinqConnect with Oracle

Posted: Fri 13 Jul 2018 18:06
by AndEx
Hello,

does LinqConnect support canonical functions or some equivalent of them?

In particular, I need to compare the year-parts of date fields with LINQ against an Oracle database.

thank you for any advice,
Andrzej

Re: Canonical functions in LinqConnect with Oracle

Posted: Tue 17 Jul 2018 09:46
by Shalex
does LinqConnect support canonical functions or some equivalent of them?
The term "canonical functions" originates from Entity SQL (used in Entity Framework), for example: https://msdn.microsoft.com/en-us/librar ... .100).aspx.
In particular, I need to compare the year-parts of date fields with LINQ against an Oracle database.
Try this way:

Code: Select all

var result = context.Emps.Where(e => e.Hiredate.Year == 2008).ToList();