共用方式為


ModelStateDictionaryExtensions.RemoveAll<TModel> 方法

定義

從 移除指定 expressionModelStateDictionary 的所有專案。

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

要針對目前模型中的專案評估的運算式。

適用於