using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DapperExtensions
{
///
/// 表属性 Table("people")
///
[AttributeUsage(AttributeTargets.Class)]
public class TableAttribute : Attribute
{
public string Name { get; set; }
public TableAttribute(string tableName)
{
this.Name = tableName;
}
}
///
/// 主键属性 Key(true) Key(false) 表示主键自增、或者主键非自增
///
[AttributeUsage(AttributeTargets.Property)]
public class KeyAttribute : Attribute
{
public bool IsIdentity { get; set; }
public KeyAttribute(bool isidentity)
{
IsIdentity = isidentity;
}
}
///
/// 忽略列,表示非数据库字段
///
[AttributeUsage(AttributeTargets.Property)]
public class ComputedAttribute : Attribute
{
}
}