Class CrudEntityAttribute
- Namespace
- Apizr.Requesting.Attributes
- Assembly
- Apizr.dll
Tells Apizr to auto register an IApizrManager<TWebApi> for this decorated entity (works only with IServiceCollection extensions registration)
[AttributeUsage(AttributeTargets.Class)]
public class CrudEntityAttribute : Attribute
- Inheritance
-
CrudEntityAttribute
- Derived
- Inherited Members
Constructors
CrudEntityAttribute(string, Type, Type, Type, Type)
Define some crud api settings from this api entity
public CrudEntityAttribute(string baseUri, Type keyType = null, Type readAllResultType = null, Type readAllParamsType = null, Type modelEntityType = null)
Parameters
baseUri
stringThis specific api entity's base crud uri
keyType
TypeThis specific api entity's crud key type (default: null = typeof(int))
readAllResultType
TypeThe "ReadAll" query result type (default: null = typeof(IEnumerable{}))
readAllParamsType
TypeReadAll query parameters type (default: null = typeof(IDictionary{string, object}))
modelEntityType
TypeModel entity type mapped with this api entity type (default: null = decorated api entity type)
Properties
BaseUri
This specific entity's base crud uri
public string BaseUri { get; }
Property Value
KeyType
This specific object's crud key type
public Type KeyType { get; }
Property Value
MappedEntityType
Model entity type mapped with this Api entity type
public Type MappedEntityType { get; set; }
Property Value
ReadAllParamsType
"ReadAll" query parameters type
public Type ReadAllParamsType { get; set; }
Property Value
ReadAllResultType
"ReadAll" query result type
public Type ReadAllResultType { get; set; }