Condividi tramite


Metodo StructuralObject.SetValidValue (DbGeography, Boolean, String)

[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]

Verifica che la proprietà non sia Null e genera un'eccezione se lo è.

Spazio dei nomi:  System.Data.Entity.Core.Objects.DataClasses
Assembly:  EntityFramework (in EntityFramework.dll)

Sintassi

'Dichiarazione
Protected Friend Shared Function SetValidValue ( _
    value As DbGeography, _
    isNullable As Boolean, _
    propertyName As String _
) As DbGeography
'Utilizzo
Dim value As DbGeography 
Dim isNullable As Boolean 
Dim propertyName As String 
Dim returnValue As DbGeography 

returnValue = StructuralObject.SetValidValue(value, _
    isNullable, propertyName)
protected internal static DbGeography SetValidValue(
    DbGeography value,
    bool isNullable,
    string propertyName
)
protected public:
static DbGeography^ SetValidValue(
    DbGeography^ value, 
    bool isNullable, 
    String^ propertyName
)
static member SetValidValue : 
        value:DbGeography * 
        isNullable:bool * 
        propertyName:string -> DbGeography
static function SetValidValue(
    value : DbGeography, 
    isNullable : boolean, 
    propertyName : String
) : DbGeography

Parametri

  • isNullable
    Tipo: System.Boolean
    Flag che indica se questa proprietà può essere Null.
  • propertyName
    Tipo: System.String
    Nome della proprietà che verrà convalidata.

Valore restituito

Tipo: System.Data.Entity.Spatial.DbGeography
Valore DbGeography che viene impostato.

Eccezioni

Eccezione Condizione
ConstraintException

Il valore è Null per una proprietà che non ammette i valori Null.

Vedere anche

Riferimento

StructuralObject Classe

Overload SetValidValue

Spazio dei nomi System.Data.Entity.Core.Objects.DataClasses