ApiController.Validate ApiController.Validate ApiController.Validate Method

Definition

Overloads

Validate<TEntity>(TEntity) Validate<TEntity>(TEntity) Validate<TEntity>(TEntity)

Validates the given entity and adds the validation errors to the ModelState under an empty prefix.

Validate<TEntity>(TEntity, String) Validate<TEntity>(TEntity, String) Validate<TEntity>(TEntity, String)

Validates the given entity and adds the validation errors to the ModelState.

Validate<TEntity>(TEntity) Validate<TEntity>(TEntity) Validate<TEntity>(TEntity)

Validates the given entity and adds the validation errors to the ModelState under an empty prefix.

public void Validate<TEntity> (TEntity entity);
member this.Validate : 'Entity -> unit
Public Sub Validate(Of TEntity) (entity As TEntity)

Type Parameters

TEntity

The type of the entity to be validated.

Parameters

entity

The entity being validated.

Validate<TEntity>(TEntity, String) Validate<TEntity>(TEntity, String) Validate<TEntity>(TEntity, String)

Validates the given entity and adds the validation errors to the ModelState.

public void Validate<TEntity> (TEntity entity, string keyPrefix);
member this.Validate : 'Entity * string -> unit
Public Sub Validate(Of TEntity) (entity As TEntity, keyPrefix As String)

Type Parameters

TEntity

The type of the entity to be validated.

Parameters

entity

The entity being validated.

keyPrefix
String String String

The key prefix under which the model state errors would be added in the ModelState.

Applies to