You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for [Id] annotations on record primary constructor parameters #9780
Now that proper support for records (in referenced assemblies too) is implemented, it would be great to be able to annotate the ctor parameter itself, rather than the more verbose (and harder to discover) syntax for annotating the backing property generated for it. This would allow to go from this:
The generator could just treat an Id attribute on a same-name ctor parameter as a property of the type as if was applied to the property, simplifying its usage in this particular scenario and saving non-trivial amount of keystrokes (for even just a few parameters, having to add property: to every property can quickly become annoying).
This would be great, if someone can make it work. It might involve finding the primary ctor for a record and matching the attributes on the ctor params with the resulting properties.
Activity
ReubenBond commentedon Nov 16, 2025
This would be great, if someone can make it work. It might involve finding the primary ctor for a record and matching the attributes on the ctor params with the resulting properties.