Table of Contents

Class SQLTypeAttribute

Namespace
ZapLib
Assembly
ZapLib.dll

SQL 專用的 Model 指定資料類型標籤,標記後 prepare stament 將使用指定類型轉換成 SQL 對應類型

[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class SQLTypeAttribute : Attribute, _Attribute, ISQLTypeAttribute
Inheritance
SQLTypeAttribute
Implements
Inherited Members

Constructors

SQLTypeAttribute(SqlDbType)

建構子,指定欄位在 SQL 的資料型態

public SQLTypeAttribute(SqlDbType SQLType)

Parameters

SQLType SqlDbType

資料庫資料型態

SQLTypeAttribute(SqlDbType, int)

建構子,指定欄位在 SQL 的資料型態與長度

public SQLTypeAttribute(SqlDbType SQLType, int size)

Parameters

SQLType SqlDbType

資料庫資料型態

size int

資料長度

Properties

Size

存取 SQL 對應類型的資料長度

public int Size { get; set; }

Property Value

int

Methods

GetSQLType()

取得指定轉換成 SQL 對應類型

public SqlDbType GetSQLType()

Returns

SqlDbType

Database 資料類型