Condividi tramite


ControllerBase.TryValidateModel Metodo

Definizione

Overload

TryValidateModel(Object)

Convalida l'istanza specificata model .

TryValidateModel(Object, String)

Convalida l'istanza specificata model .

TryValidateModel(Object)

Origine:
ControllerBase.cs
Origine:
ControllerBase.cs
Origine:
ControllerBase.cs

Convalida l'istanza specificata model .

public:
 virtual bool TryValidateModel(System::Object ^ model);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual bool TryValidateModel (object model);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member TryValidateModel : obj -> bool
override this.TryValidateModel : obj -> bool
Public Overridable Function TryValidateModel (model As Object) As Boolean

Parametri

model
Object

Modello da convalidare.

Restituisce

true se è ModelState valido; false in caso contrario.

Attributi

Si applica a

TryValidateModel(Object, String)

Origine:
ControllerBase.cs
Origine:
ControllerBase.cs
Origine:
ControllerBase.cs

Convalida l'istanza specificata model .

public:
 virtual bool TryValidateModel(System::Object ^ model, System::String ^ prefix);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual bool TryValidateModel (object model, string prefix);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual bool TryValidateModel (object model, string? prefix);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member TryValidateModel : obj * string -> bool
override this.TryValidateModel : obj * string -> bool
Public Overridable Function TryValidateModel (model As Object, prefix As String) As Boolean

Parametri

model
Object

Modello da convalidare.

prefix
String

Chiave da usare per la ricerca di informazioni in ModelState.

Restituisce

true se è ModelState valido;false in caso contrario.

Attributi

Si applica a