ITLab.Template.DevPack.Attributes
Provides custom attributes for metadata decoration, behavior configuration and pipeline integration.
Componentes
| Tipo | Nome | Responsabilidade |
|---|---|---|
| Attribute | AdditionalAttribute | Attaches free-form metadata strings to any annotated target |
| Attribute | DisableIdGenerationAttribute | Suppresses automatic ID generation for the annotated entity or property |
| Attribute | ErrorCatalogAttribute | Maps a type or member to a named error catalog entry |
| Attribute | NotifyAttribute | Signals that the annotated member should trigger a notification when changed |
Como usar
// Suppress auto ID generation on an entity.
[DisableIdGeneration]
public sealed class ExternalIntegrationRecord : Entity<string> { }
Mudanças na 10.2.0
- Removido
NormalizeDateTimeOffsetAttribute. Era consumido peloNormalizeDateTimeOffsetBehavior, também removido. ComAuditedEntitymigrada paraDateTimeUTC +LocalTimeZone, o pipeline de normalização perdeu razão de existir.
O que não fazer
- Do not add business logic inside attribute constructors.
- Do not use
AdditionalAttributeas a replacement for strongly typed metadata.
Extensão pelo produto
- Products can combine
ErrorCatalogAttributewith error catalog resolvers to surface localized messages.