Condividi tramite


PageModel.TryUpdateModelAsync Metodo

Definizione

Overload

TryUpdateModelAsync(Object, Type, String)

Aggiornamenti'istanza specificata model utilizzando i valori dell'oggetto PageModelcorrente IValueProvider e di .name

TryUpdateModelAsync(Object, Type, String, IValueProvider, Func<ModelMetadata,Boolean>)

Aggiornamenti'istanza specificata model utilizzando valueProvider e .name

TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Expression<Func<TModel,Object>>[])

Aggiornamenti'istanza specificata model utilizzando valueProvider e .name

TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Func<ModelMetadata,Boolean>)

Aggiornamenti'istanza specificata model utilizzando valueProvider e .name

TryUpdateModelAsync<TModel>(TModel, String, Expression<Func<TModel,Object>>[])

Aggiornamenti'istanza specificata model utilizzando i valori dell'oggetto PageModelcorrente IValueProvider e di .name

TryUpdateModelAsync<TModel>(TModel, String, IValueProvider)

Aggiornamenti'istanza specificata model utilizzando valueProvider e .name

TryUpdateModelAsync<TModel>(TModel, String)

Aggiornamenti'istanza specificata model utilizzando i valori dell'oggetto PageModelcorrente IValueProviderdi .

TryUpdateModelAsync<TModel>(TModel)

Aggiornamenti'istanza specificata model utilizzando i valori dell'oggetto PageModelcorrente IValueProviderdi .

TryUpdateModelAsync<TModel>(TModel, String, Func<ModelMetadata,Boolean>)

Aggiornamenti'istanza specificata model utilizzando i valori dell'oggetto PageModelcorrente IValueProvider e di .name

TryUpdateModelAsync(Object, Type, String)

Origine:
PageModel.cs
Origine:
PageModel.cs

Aggiornamenti'istanza specificata model utilizzando i valori dell'oggetto PageModelcorrente IValueProvider e di .name

protected public:
 System::Threading::Tasks::Task<bool> ^ TryUpdateModelAsync(System::Object ^ model, Type ^ modelType, System::String ^ name);
protected internal System.Threading.Tasks.Task<bool> TryUpdateModelAsync (object model, Type modelType, string name);
member this.TryUpdateModelAsync : obj * Type * string -> System.Threading.Tasks.Task<bool>
Protected Friend Function TryUpdateModelAsync (model As Object, modelType As Type, name As String) As Task(Of Boolean)

Parametri

model
Object

Istanza del modello da aggiornare.

modelType
Type

Tipo di istanza del modello da aggiornare.

name
String

Nome da utilizzare durante la ricerca di valori nell'oggetto corrente IValueProvider.

Restituisce

Oggetto Task che al completamento restituisce true se l'aggiornamento ha esito positivo.

Si applica a

TryUpdateModelAsync(Object, Type, String, IValueProvider, Func<ModelMetadata,Boolean>)

Origine:
PageModel.cs
Origine:
PageModel.cs

Aggiornamenti'istanza specificata model utilizzando valueProvider e .name

protected public:
 System::Threading::Tasks::Task<bool> ^ TryUpdateModelAsync(System::Object ^ model, Type ^ modelType, System::String ^ name, Microsoft::AspNetCore::Mvc::ModelBinding::IValueProvider ^ valueProvider, Func<Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^, bool> ^ propertyFilter);
protected internal System.Threading.Tasks.Task<bool> TryUpdateModelAsync (object model, Type modelType, string name, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Func<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata,bool> propertyFilter);
member this.TryUpdateModelAsync : obj * Type * string * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Func<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata, bool> -> System.Threading.Tasks.Task<bool>
Protected Friend Function TryUpdateModelAsync (model As Object, modelType As Type, name As String, valueProvider As IValueProvider, propertyFilter As Func(Of ModelMetadata, Boolean)) As Task(Of Boolean)

Parametri

model
Object

Istanza del modello da aggiornare.

modelType
Type

Tipo di istanza del modello da aggiornare.

name
String

Nome da utilizzare durante la valueProviderricerca dei valori in .

valueProvider
IValueProvider

Oggetto IValueProvider utilizzato per la ricerca di valori.

propertyFilter
Func<ModelMetadata,Boolean>

Predicato che può essere usato per filtrare le proprietà in fase di esecuzione.

Restituisce

Oggetto Task che al completamento restituisce true se l'aggiornamento ha esito positivo.

Si applica a

TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Expression<Func<TModel,Object>>[])

Origine:
PageModel.cs
Origine:
PageModel.cs

Aggiornamenti'istanza specificata model utilizzando valueProvider e .name

protected public:
generic <typename TModel>
 where TModel : class System::Threading::Tasks::Task<bool> ^ TryUpdateModelAsync(TModel model, System::String ^ name, Microsoft::AspNetCore::Mvc::ModelBinding::IValueProvider ^ valueProvider, ... cli::array <System::Linq::Expressions::Expression<Func<TModel, System::Object ^> ^> ^> ^ includeExpressions);
protected internal System.Threading.Tasks.Task<bool> TryUpdateModelAsync<TModel> (TModel model, string name, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, params System.Linq.Expressions.Expression<Func<TModel,object>>[] includeExpressions) where TModel : class;
protected internal System.Threading.Tasks.Task<bool> TryUpdateModelAsync<TModel> (TModel model, string name, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, params System.Linq.Expressions.Expression<Func<TModel,object?>>[] includeExpressions) where TModel : class;
member this.TryUpdateModelAsync : 'Model * string * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * System.Linq.Expressions.Expression<Func<'Model, obj>>[] -> System.Threading.Tasks.Task<bool> (requires 'Model : null)
Protected Friend Function TryUpdateModelAsync(Of TModel As Class) (model As TModel, name As String, valueProvider As IValueProvider, ParamArray includeExpressions As Expression(Of Func(Of TModel, Object))()) As Task(Of Boolean)

Parametri di tipo

TModel

Tipo dell'oggetto modello.

Parametri

model
TModel

Istanza del modello da aggiornare.

name
String

Nome da utilizzare durante la valueProviderricerca dei valori in .

valueProvider
IValueProvider

Oggetto IValueProvider utilizzato per la ricerca di valori.

includeExpressions
Expression<Func<TModel,Object>>[]

Expression(s) che rappresentano le proprietà di primo livello che devono essere incluse per il modello corrente.

Restituisce

Oggetto Task che al completamento restituisce true se l'aggiornamento ha esito positivo.

Si applica a

TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Func<ModelMetadata,Boolean>)

Origine:
PageModel.cs
Origine:
PageModel.cs

Aggiornamenti'istanza specificata model utilizzando valueProvider e .name

protected public:
generic <typename TModel>
 where TModel : class System::Threading::Tasks::Task<bool> ^ TryUpdateModelAsync(TModel model, System::String ^ name, Microsoft::AspNetCore::Mvc::ModelBinding::IValueProvider ^ valueProvider, Func<Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^, bool> ^ propertyFilter);
protected internal System.Threading.Tasks.Task<bool> TryUpdateModelAsync<TModel> (TModel model, string name, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Func<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata,bool> propertyFilter) where TModel : class;
member this.TryUpdateModelAsync : 'Model * string * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Func<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata, bool> -> System.Threading.Tasks.Task<bool> (requires 'Model : null)
Protected Friend Function TryUpdateModelAsync(Of TModel As Class) (model As TModel, name As String, valueProvider As IValueProvider, propertyFilter As Func(Of ModelMetadata, Boolean)) As Task(Of Boolean)

Parametri di tipo

TModel

Tipo dell'oggetto modello.

Parametri

model
TModel

Istanza del modello da aggiornare.

name
String

Nome da utilizzare durante la valueProviderricerca dei valori in .

valueProvider
IValueProvider

Oggetto IValueProvider utilizzato per la ricerca di valori.

propertyFilter
Func<ModelMetadata,Boolean>

Predicato che può essere usato per filtrare le proprietà in fase di esecuzione.

Restituisce

Oggetto Task che al completamento restituisce true se l'aggiornamento ha esito positivo.

Si applica a

TryUpdateModelAsync<TModel>(TModel, String, Expression<Func<TModel,Object>>[])

Origine:
PageModel.cs
Origine:
PageModel.cs

Aggiornamenti'istanza specificata model utilizzando i valori dell'oggetto PageModelcorrente IValueProvider e di .name

protected public:
generic <typename TModel>
 where TModel : class System::Threading::Tasks::Task<bool> ^ TryUpdateModelAsync(TModel model, System::String ^ name, ... cli::array <System::Linq::Expressions::Expression<Func<TModel, System::Object ^> ^> ^> ^ includeExpressions);
protected internal System.Threading.Tasks.Task<bool> TryUpdateModelAsync<TModel> (TModel model, string name, params System.Linq.Expressions.Expression<Func<TModel,object>>[] includeExpressions) where TModel : class;
protected internal System.Threading.Tasks.Task<bool> TryUpdateModelAsync<TModel> (TModel model, string name, params System.Linq.Expressions.Expression<Func<TModel,object?>>[] includeExpressions) where TModel : class;
member this.TryUpdateModelAsync : 'Model * string * System.Linq.Expressions.Expression<Func<'Model, obj>>[] -> System.Threading.Tasks.Task<bool> (requires 'Model : null)
Protected Friend Function TryUpdateModelAsync(Of TModel As Class) (model As TModel, name As String, ParamArray includeExpressions As Expression(Of Func(Of TModel, Object))()) As Task(Of Boolean)

Parametri di tipo

TModel

Tipo dell'oggetto modello.

Parametri

model
TModel

Istanza del modello da aggiornare.

name
String

Nome da utilizzare durante la ricerca di valori nell'oggetto corrente IValueProvider.

includeExpressions
Expression<Func<TModel,Object>>[]

Expression(s) che rappresentano le proprietà di primo livello che devono essere incluse per il modello corrente.

Restituisce

Oggetto Task che al completamento restituisce true se l'aggiornamento ha esito positivo.

Si applica a

TryUpdateModelAsync<TModel>(TModel, String, IValueProvider)

Origine:
PageModel.cs
Origine:
PageModel.cs

Aggiornamenti'istanza specificata model utilizzando valueProvider e .name

protected public:
generic <typename TModel>
 where TModel : class System::Threading::Tasks::Task<bool> ^ TryUpdateModelAsync(TModel model, System::String ^ name, Microsoft::AspNetCore::Mvc::ModelBinding::IValueProvider ^ valueProvider);
protected internal System.Threading.Tasks.Task<bool> TryUpdateModelAsync<TModel> (TModel model, string name, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider) where TModel : class;
member this.TryUpdateModelAsync : 'Model * string * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider -> System.Threading.Tasks.Task<bool> (requires 'Model : null)
Protected Friend Function TryUpdateModelAsync(Of TModel As Class) (model As TModel, name As String, valueProvider As IValueProvider) As Task(Of Boolean)

Parametri di tipo

TModel

Tipo dell'oggetto modello.

Parametri

model
TModel

Istanza del modello da aggiornare.

name
String

Nome da utilizzare durante la valueProviderricerca dei valori in .

valueProvider
IValueProvider

Oggetto IValueProvider utilizzato per la ricerca di valori.

Restituisce

Oggetto Task che al completamento restituisce true se l'aggiornamento ha esito positivo.

Si applica a

TryUpdateModelAsync<TModel>(TModel, String)

Origine:
PageModel.cs
Origine:
PageModel.cs

Aggiornamenti'istanza specificata model utilizzando i valori dell'oggetto PageModelcorrente IValueProviderdi .

protected public:
generic <typename TModel>
 where TModel : class System::Threading::Tasks::Task<bool> ^ TryUpdateModelAsync(TModel model, System::String ^ name);
protected internal System.Threading.Tasks.Task<bool> TryUpdateModelAsync<TModel> (TModel model, string name) where TModel : class;
member this.TryUpdateModelAsync : 'Model * string -> System.Threading.Tasks.Task<bool> (requires 'Model : null)
Protected Friend Function TryUpdateModelAsync(Of TModel As Class) (model As TModel, name As String) As Task(Of Boolean)

Parametri di tipo

TModel

Tipo dell'oggetto modello.

Parametri

model
TModel

Istanza del modello da aggiornare.

name
String

Nome del modello.

Restituisce

Oggetto Task che al completamento restituisce true se l'aggiornamento ha esito positivo.

Si applica a

TryUpdateModelAsync<TModel>(TModel)

Origine:
PageModel.cs
Origine:
PageModel.cs

Aggiornamenti'istanza specificata model utilizzando i valori dell'oggetto PageModelcorrente IValueProviderdi .

protected public:
generic <typename TModel>
 where TModel : class System::Threading::Tasks::Task<bool> ^ TryUpdateModelAsync(TModel model);
protected internal System.Threading.Tasks.Task<bool> TryUpdateModelAsync<TModel> (TModel model) where TModel : class;
member this.TryUpdateModelAsync : 'Model -> System.Threading.Tasks.Task<bool> (requires 'Model : null)
Protected Friend Function TryUpdateModelAsync(Of TModel As Class) (model As TModel) As Task(Of Boolean)

Parametri di tipo

TModel

Tipo dell'oggetto modello.

Parametri

model
TModel

Istanza del modello da aggiornare.

Restituisce

Oggetto Task che al completamento restituisce true se l'aggiornamento ha esito positivo.

Si applica a

TryUpdateModelAsync<TModel>(TModel, String, Func<ModelMetadata,Boolean>)

Origine:
PageModel.cs
Origine:
PageModel.cs

Aggiornamenti'istanza specificata model utilizzando i valori dell'oggetto PageModelcorrente IValueProvider e di .name

protected public:
generic <typename TModel>
 where TModel : class System::Threading::Tasks::Task<bool> ^ TryUpdateModelAsync(TModel model, System::String ^ name, Func<Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^, bool> ^ propertyFilter);
protected internal System.Threading.Tasks.Task<bool> TryUpdateModelAsync<TModel> (TModel model, string name, Func<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata,bool> propertyFilter) where TModel : class;
member this.TryUpdateModelAsync : 'Model * string * Func<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata, bool> -> System.Threading.Tasks.Task<bool> (requires 'Model : null)
Protected Friend Function TryUpdateModelAsync(Of TModel As Class) (model As TModel, name As String, propertyFilter As Func(Of ModelMetadata, Boolean)) As Task(Of Boolean)

Parametri di tipo

TModel

Tipo dell'oggetto modello.

Parametri

model
TModel

Istanza del modello da aggiornare.

name
String

Nome da utilizzare durante la ricerca di valori nell'oggetto corrente IValueProvider.

propertyFilter
Func<ModelMetadata,Boolean>

Predicato che può essere usato per filtrare le proprietà in fase di esecuzione.

Restituisce

Oggetto Task che al completamento restituisce true se l'aggiornamento ha esito positivo.

Si applica a