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/05/26 12:53:04 UTC

[jira] [Commented] (IGNITE-5298) .NET: DML update via LINQ

    [ https://issues.apache.org/jira/browse/IGNITE-5298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16026241#comment-16026241 ] 

Pavel Tupitsyn commented on IGNITE-5298:
----------------------------------------

{{=}} cannot be used in expression trees: {{an expression tree may not contain an assignment operator}}.
However, there is an {{Expression.Assign}}. We can provide an extension method which works like this:

{{persons.Where(x => x.Key > 10).UpdateAll(x => x.Value.OrgId.Set(7));}}

> .NET: DML update via LINQ
> -------------------------
>
>                 Key: IGNITE-5298
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5298
>             Project: Ignite
>          Issue Type: New Feature
>          Components: platforms
>    Affects Versions: 2.1
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>              Labels: .NET, LINQ, important
>             Fix For: 2.2
>
>
> Bulk update with LINQ:
> {code}
> var persons = ignite.GetCache<int, Person>("persons").AsCacheQueryable();
> int affectedRows = persons.Where(x => x.Key > 10).UpdateAll(x => x.Value.OrgId = 7);
> {code}
> See bulk delete with {{RemoveAll}}, IGNITE-4904.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)