ApiController.Validate Method

Definition

Overloads

Validate<TEntity>(TEntity)

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

Validate<TEntity>(TEntity, String)

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

Validate<TEntity>(TEntity)

Source:
ApiController.cs
Source:
ApiController.cs

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
TEntity

The entity being validated.

Applies to

Validate<TEntity>(TEntity, String)

Source:
ApiController.cs
Source:
ApiController.cs

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
TEntity

The entity being validated.

keyPrefix
String

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

Applies to