pgsql/mysql/sqlserver适配

This commit is contained in:
28810
2018-12-18 20:09:52 +08:00
commit 9b5e34032c
130 changed files with 12283 additions and 0 deletions

View File

@ -0,0 +1,32 @@
using System;
namespace FreeSql.DataAnnotations {
public class ColumnAttribute : Attribute {
/// <summary>
/// 数据库列名
/// </summary>
public string Name { get; set; }
/// <summary>
/// 指定数据库旧的列名修改实体属性命名时同时设置此参数为修改之前的值CodeFirst才可以正确修改数据库字段否则将视为【新增字段】
/// </summary>
public string OldName { get; set; }
/// <summary>
/// 数据库类型,如: varchar(255)
/// </summary>
public string DbType { get; set; }
/// <summary>
/// 主键
/// </summary>
public bool IsPrimary { get; set; }
/// <summary>
/// 自增标识
/// </summary>
public bool IsIdentity { get; set; }
/// <summary>
/// 是否可DBNull
/// </summary>
public bool IsNullable { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using System;
namespace FreeSql.DataAnnotations {
public class TableAttribute : Attribute {
/// <summary>
/// 数据库表名
/// </summary>
public string Name { get; set; }
/// <summary>
/// 指定数据库旧的表名修改实体命名时同时设置此参数为修改之前的值CodeFirst才可以正确修改数据库表否则将视为【创建新表】
/// </summary>
public string OldName { get; set; }
/// <summary>
/// 查询过滤SQL实现类似 a.IsDeleted = 1 功能
/// </summary>
public string SelectFilter { get; set; }
}
}