語言

ParameterBuilder.Geography 方法

定義

建立新的參數定義以傳遞地理資料。

實體框架遷移 API 並非設計用來接受不受信任來源(例如應用程式的最終使用者)提供的輸入。 若接受來自這些來源的輸入,應在傳遞給這些 API 前進行驗證,以防止 SQL 注入攻擊等攻擊。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public System.Data.Entity.Migrations.Model.ParameterModel Geography(System.Data.Entity.Spatial.DbGeography defaultValue = null, string defaultValueSql = null, string name = null, string storeType = null, bool outParameter = false);
member this.Geography : System.Data.Entity.Spatial.DbGeography * string * string * string * bool -> System.Data.Entity.Migrations.Model.ParameterModel
Public Function Geography (Optional defaultValue As DbGeography = null, Optional defaultValueSql As String = null, Optional name As String = null, Optional storeType As String = null, Optional outParameter As Boolean = false) As ParameterModel

參數

defaultValue
DbGeography

常數值作為此參數的預設值。

defaultValueSql
String

SQL 表達式作為此參數的預設值。

name
String

參數的名稱。

storeType
String

此參數需使用提供者專用的資料型別。

outParameter
Boolean

一個表示參數是否為輸出參數的值。

傳回

新建構的參數定義。

屬性

適用於