dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.75k stars 3.18k forks source link

Implement value conversions that spread out over multiple columns #31234

Open AndriySvyryd opened 1 year ago

AndriySvyryd commented 1 year ago

Multi-column value conversions were initially tracked by #13947 as a way to enable value objects, but we decided to instead implement them using complex types.

This issue tracks using value conversions as an alternative to complex types.

Pros

Cons

mguinness commented 1 year ago

From linked issue:

Another area where this could be useful is storing DateTimeOffset into two fields for databases like MySQL which have no equivalent data type.