ModelStateDictionaryExtensions.RemoveAll<TModel> Method

Definition

Removes all the entries for the specified expression from the ModelStateDictionary.

public:
generic <typename TModel>
[System::Runtime::CompilerServices::Extension]
 static void RemoveAll(Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ modelState, System::Linq::Expressions::Expression<Func<TModel, System::Object ^> ^> ^ expression);
public static void RemoveAll<TModel> (this Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, System.Linq.Expressions.Expression<Func<TModel,object>> expression);
static member RemoveAll : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary * System.Linq.Expressions.Expression<Func<'Model, obj>> -> unit
<Extension()>
Public Sub RemoveAll(Of TModel) (modelState As ModelStateDictionary, expression As Expression(Of Func(Of TModel, Object)))

Type Parameters

TModel

The type of the model.

Parameters

modelState
ModelStateDictionary

The ModelStateDictionary instance this method extends.

expression
Expression<Func<TModel,Object>>

An expression to be evaluated against an item in the current model.

Applies to