Scaffolding column with ValueGenerated.OnUpdate
generates invalid C# code
#18579
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Milestone
See PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#877 for an example (issue 2).
The issue is, that the following
switch
is missing the handling ofValueGenerated.OnUpdate
:https://github.com/aspnet/EntityFrameworkCore/blob/27c8d56284a641ef0836972ced08db8f7433674d/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs#L701-L730
It will therefore generate
entity.Property(e => e.MyProperty).()
for properties withValueGenerated.OnUpdate
.Is that an oversight or a deliberate choice?
The text was updated successfully, but these errors were encountered: