Class ReverseForgeAttribute
- Namespace
- ForgeMap
- Assembly
- ForgeMap.Abstractions.dll
Generates a reverse forging method automatically.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class ReverseForgeAttribute : Attribute
- Inheritance
-
objectAttributeReverseForgeAttribute
Remarks
The reverse method maps all matching writable properties in the opposite direction.
When the forward method maps from an internal model to an external DTO,
the generated reverse method allows the DTO to overwrite every matched writable
property on the model — including security-sensitive fields such as IsAdmin,
PasswordHash, or audit timestamps. Use IgnoreAttribute on
the forward method to exclude properties that should not be writable via the
reverse mapping.