dotnet / dotnet/efcore

Allow for custom setters in ExecuteUpdate

Open
#36,836 0 comments 0 reactions 0 assignees View on GitHub
area-bulkupdate consider-for-next-release
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

We currently support a fixed set of things in ExecuteUpdate setters - regular columns, table-splitting complex types, JSON scalar properties, JSON complex types. It's impossible for providers to add support for their own setter types.

This is specifically a problem for PostgreSQL in https://github.com/npgsql/efcore.pg/issues/3622, where scalar collections are mapped to PG arrays, which require special handling:

```c#
context.Blogs.ExecuteUpdateAsync(s => s.SetProperty(b => b.Tags[0], "foo")
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.