Table of Contents

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 string

This specific api entity's base crud uri

keyType Type

This specific api entity's crud key type (default: null = typeof(int))

readAllResultType Type

The "ReadAll" query result type (default: null = typeof(IEnumerable{}))

readAllParamsType Type

ReadAll query parameters type (default: null = typeof(IDictionary{string, object}))

modelEntityType Type

Model 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

string

KeyType

This specific object's crud key type

public Type KeyType { get; }

Property Value

Type

MappedEntityType

Model entity type mapped with this Api entity type

public Type MappedEntityType { get; set; }

Property Value

Type

ReadAllParamsType

"ReadAll" query parameters type

public Type ReadAllParamsType { get; set; }

Property Value

Type

ReadAllResultType

"ReadAll" query result type

public Type ReadAllResultType { get; set; }

Property Value

Type