Nedo.AspNet.Metadata
1.0.0
dotnet add package Nedo.AspNet.Metadata --version 1.0.0
NuGet\Install-Package Nedo.AspNet.Metadata -Version 1.0.0
<PackageReference Include="Nedo.AspNet.Metadata" Version="1.0.0" />
<PackageVersion Include="Nedo.AspNet.Metadata" Version="1.0.0" />
<PackageReference Include="Nedo.AspNet.Metadata" />
paket add Nedo.AspNet.Metadata --version 1.0.0
#r "nuget: Nedo.AspNet.Metadata, 1.0.0"
#:package Nedo.AspNet.Metadata@1.0.0
#addin nuget:?package=Nedo.AspNet.Metadata&version=1.0.0
#tool nuget:?package=Nedo.AspNet.Metadata&version=1.0.0
Nedo.AspNet.Metadata
The attribute vocabulary that tells the platform what an entity is: its identity in the authorization registry, what each field looks like on a form, and which properties are inline child collections.
Attributes only. The package has no dependencies at all — not EF Core, not ASP.NET Core — so an entity assembly can be annotated without taking on an ORM, a web framework, or the authorization engine. The engines that read these attributes (the resource registry, the CRUD layer, a form renderer) each depend on this package, never the other way round.
Install
dotnet add package Nedo.AspNet.Metadata
Declaring a resource
[Resource("sales", "order",
DisplayName = "Order",
Description = "A customer order.",
ResourceType = "transaction")]
public class Order : FullAuditableEntity
{
[TextType(DisplayName = "Number")]
public string Number { get; set; } = default!;
[RefType(DisplayName = "Customer", Target = "sales.customer")]
public Guid CustomerId { get; set; }
[MoneyType(DisplayName = "Total")]
public decimal Total { get; set; }
[IgnoreField] // internal column, never a registry field
public string CodeRing { get; set; } = default!;
}
The registry key is module.entity (sales.order) and must match the [AuthResource("sales.order")]
on the controller that serves it: this tag seeds the registry, that one gates requests.
Field types
[ResourceField(NedoFieldType.X)] gives a property its form control, and the typed wrappers are the
ergonomic spelling of the same thing: [TextType], [EmailType], [PasswordType], [NumberType],
[TextAreaType], [MoneyType], [PhoneType], [FileType], [ImageType], [RefType],
[MultiRefType], [DataGridType], [DateTimeType], [DateType], [TimeType], [BooleanType].
A property with no attribute is still a field — the reader infers its type from the CLR type;
[IgnoreField] opts one out.
Labels and the second locale
DisplayName is English. DisplayNameId is the label in the application's second locale: the
…Id suffix is that locale's ISO 639-1 code (id = Indonesian), not an identifier. The pair is
two columns rather than a translation table, so a label costs no extra round trip. DisplayNameKey
overrides both with an i18n key the client resolves from its own bundle; omitted, the consumer
derives authz.resource.{module}.{entity}.
Child collections
public class CreateOrderRequest
{
[ChildCollection(typeof(OrderLine))]
public List<OrderLineRequest>? Lines { get; set; }
}
The CRUD layer persists the lines atomically with the parent: on create they insert in the parent's
transaction; on update the desired set reconciles (update by id, insert id-less, soft-delete
dropped). A null list means "no child intent"; an empty list reconciles to zero rows. For a
many-to-many join, ReconcileKey names the reference property that identifies a line, so a matched
soft-deleted row is reactivated in place rather than colliding with the join's unique index.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Nedo.AspNet.Metadata:
| Package | Downloads |
|---|---|
|
Nedo.AspNet.Authorization
Authorization engine for ASP.NET Core: roles as a code-ring tree, organization scoping, per-page and per-field grants, row-level data filters with an expression language, delegations, and an admin API over the whole model. Table and column names are the host's to choose; migrations belong to the application, not to this package. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 159 | 9/24/2026 |