v0.1.0 & FreeSql.Repository

This commit is contained in:
28810
2019-02-20 17:28:51 +08:00
parent 9222de0668
commit 204ab9f7d8
15 changed files with 78 additions and 53 deletions

View File

@ -16,7 +16,7 @@ namespace FreeSql.DataAnnotations {
/// </summary>
public string DbType { get; set; }
internal bool? _IsPrimary, _IsIdentity, _IsNullable;
internal bool? _IsPrimary, _IsIdentity, _IsNullable, _IsIgnore;
/// <summary>
/// 主键
/// </summary>
@ -29,6 +29,10 @@ namespace FreeSql.DataAnnotations {
/// 是否可DBNull
/// </summary>
public bool IsNullable { get => _IsNullable ?? false; set => _IsNullable = value; }
/// <summary>
/// 忽略此列,不迁移、不插入
/// </summary>
public bool IsIgnore { get => _IsIgnore ?? false; set => _IsIgnore = value; }
/// <summary>
/// 数据库默认值

View File

@ -50,5 +50,12 @@ namespace FreeSql.DataAnnotations {
_column.IsNullable = value;
return this;
}
/// <summary>
/// 忽略此列,不迁移、不插入
/// </summary>
public ColumnFluent IsIgnore(bool value) {
_column.IsIgnore = value;
return this;
}
}
}