You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Tupitsyn (JIRA)" <ji...@apache.org> on 2017/07/04 15:58:01 UTC
[jira] [Updated] (IGNITE-4818) .NET DayOfWeek does not work as a
LINQ parameter
[ https://issues.apache.org/jira/browse/IGNITE-4818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Tupitsyn updated IGNITE-4818:
-----------------------------------
Fix Version/s: (was: 2.1)
> .NET DayOfWeek does not work as a LINQ parameter
> ------------------------------------------------
>
> Key: IGNITE-4818
> URL: https://issues.apache.org/jira/browse/IGNITE-4818
> Project: Ignite
> Issue Type: Bug
> Components: platforms
> Affects Versions: 1.9
> Reporter: Pavel Tupitsyn
> Priority: Minor
> Labels: .NET, LINQ
>
> IGNITE-4359 added support for {{DateTime.DayOfWeek}}, but it can't be used in Where clause:
> {code}
> var res = persons.AsCacheQueryable().Where(x => x.Value.BirthDay.DayOfWeek == DayOfWeek.Monday);
> {code}
> This fails because {{DayOfWeek.Monday}} is written as a serializable enum.
> Workaround is to cast to an int:
> {code}
> var res = persons.AsCacheQueryable().Where(x => (int)x.Value.BirthDay.DayOfWeek == (int)DayOfWeek.Monday);
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)