Controllers, resource services, repositories, repository accessors, and IQueryLayerComposer should be annotated with [DisallowNull] for method parameters named id. While it can be null in the resource type itself (to support zero values), they should never be for incoming requests.
Adding this annotation produces a compiler warning when called directly from custom code.
We can't add the notnull constraint on TId, because that breaks the contract with IIdentifiable<TId>.
Controllers, resource services, repositories, repository accessors, and
IQueryLayerComposer
should be annotated with[DisallowNull]
for method parameters namedid
. While it can benull
in the resource type itself (to support zero values), they should never be for incoming requests.Adding this annotation produces a compiler warning when called directly from custom code.
We can't add the
notnull
constraint onTId
, because that breaks the contract withIIdentifiable<TId>
.