Description
IGNITE-4359 added support for DateTime.DayOfWeek, but it can't be used in Where clause:
var res = persons.AsCacheQueryable().Where(x => x.Value.BirthDay.DayOfWeek == DayOfWeek.Monday);
This fails because DayOfWeek.Monday is written as a serializable enum.
Workaround is to cast to an int:
var res = persons.AsCacheQueryable().Where(x => (int)x.Value.BirthDay.DayOfWeek == (int)DayOfWeek.Monday);
Attachments
Issue Links
- relates to
-
IGNITE-4359 .NET: Support DateTime properties in LINQ
- Resolved