ApiController::Validate Method

 

Namespace:   System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

NameDescription
System_CAPS_pubmethodValidate<TEntity>(TEntity)

Validates the given entity and adds the validation errors to the model state under the empty prefix, if any.

System_CAPS_pubmethodValidate<TEntity>(TEntity, String^)

Validates the given entity and adds the validation errors to the model state, if any.

Return to top

ApiController::Validate<TEntity> Method (TEntity)

Validates the given entity and adds the validation errors to the model state under the empty prefix, if any.

public:
generic<typename TEntity>
void Validate(
	TEntity entity
)

Parameters

entity
Type: TEntity

The entity being validated.

Type Parameters

TEntity

The type of the entity to be validated.

Return to top

ApiController::Validate<TEntity> Method (TEntity, String^)

Validates the given entity and adds the validation errors to the model state, if any.

public:
generic<typename TEntity>
void Validate(
	TEntity entity,
	String^ keyPrefix
)

Parameters

entity
Type: TEntity

The entity being validated.

keyPrefix
Type: System::String^

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

Type Parameters

TEntity

The type of the entity to be validated.

Return to top
Show: