ApiController::Validate Method
Namespace:
System.Web.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
| Name | Description | |
|---|---|---|
![]() | Validate<TEntity>(TEntity) | Validates the given entity and adds the validation errors to the model state under the empty prefix, if any. |
![]() | Validate<TEntity>(TEntity, String^) | Validates the given entity and adds the validation errors to the model state, if any. |
ApiController::Validate<TEntity> Method (TEntity)
Validates the given entity and adds the validation errors to the model state under the empty prefix, if any.
ApiController::Validate<TEntity> Method (TEntity, String^)
Validates the given entity and adds the validation errors to the model state, if any.
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.
Show:
