ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Tupitsyn (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-4818) .NET DayOfWeek does not work as a LINQ parameter
Date Thu, 06 Apr 2017 12:50:41 GMT

     [ 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.0)
                   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
>             Fix For: 2.1
>
>
> 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.3.15#6346)

Mime
View raw message