ModelStateDictionaryExtensions.RemoveAll<TModel> 方法

定义

ModelStateDictionary中移除指定 expression 的所有条目。

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)))

类型参数

TModel

模型的类型。

参数

modelState
ModelStateDictionary

ModelStateDictionary此方法扩展的实例。

expression
Expression<Func<TModel,Object>>

要针对当前模型中的项计算的表达式。

适用于