Skip to content

Array append not translate after update to version 10.0 RC #3661

@mojtabakaviani

Description

@mojtabakaviani

In version 9.0 execute update array property work properly.

await db.LineSteps.Where(l => l.LineId == lineid)
                  .ExecuteUpdateAsync(l => l.SetProperty(p => p.Flows, p => p.Flows.Append(flowid)));

but in version 10 RC, not working. and raise error:

fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
      System.InvalidOperationException: The LINQ expression 'EF.Property<short[]>(l, "Flows")
          .AsQueryable()
          .Append(@dto_FlowId)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions