ModelStateDictionaryExtensions.Remove<TModel> Metoda

Definice

Odebere zadanou expression hodnotu z objektu ModelStateDictionary.

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

Parametry typu

TModel

Typ modelu.

Parametry

modelState
ModelStateDictionary

Instance ModelStateDictionary , která tato metoda rozšiřuje.

expression
Expression<Func<TModel,Object>>

Výraz, který má být vyhodnocen proti položce v aktuálním modelu.

Návraty

pokud je prvek úspěšně odebrán; jinak false. Tato metoda také vrátí hodnotu false, pokud expression nebyla nalezena ve slovníku stavu modelu.

Platí pro