日期:2014-05-17 浏览次数:20926 次
[fastCSharp.setup.cSharp.sqlTable(ConnectionName = "Connection1")]
public partial class model1
{
/// <summary>
/// 自增列,一个表格只允许一个,如果不配置IsIdentity = true,将自动匹配名称为 id 的成员
/// </summary>
[fastCSharp.setup.sqlMember(IsIdentity = true)]
public int id;
/// <summary>
/// 关键字1,多个关键字成员按照成员定义顺序一致
/// </summary>
[fastCSharp.setup.sqlMember(IsPrimaryKey = true)]
public int key1;
/// <summary>
/// 关键字2
/// </summary>
[fastCSharp.setup.sqlMember(IsPrimaryKey = true, IsAscii = true, MaxLength = 32)]
public string key2;
public enum EnumByte : byte
{
Enum1
}
/// <summary>
/// 直接支持枚举类型转换,可以不指定SqlType = typeof(byte)
/// </summary>
[fastCSharp.setup.sqlMember(SqlType = typeof(byte))]
public EnumByte key2;
/// <summary>
/// 指定隐式类型转换
/// </summary>
[fastCSharp.setup.sqlMember(SqlType = typeof(string))]
public partial struct image
{
public string url;
/// <summary>
/// 如果不能隐式类型转换,必须实现互转函数
/// </summary>
&nbs