mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
## v0.3.27
- 增加 行级锁功能,适用修改实体; - 增加 FreeSql.Repository 默认依赖注入的方式,同时保留原有 Autofac; - 优化 FreeSql.Repository Insert 逻辑,参考了 FreeSql.DbContext; - 优化 FreeSql.IUpdate 参照 IInsert 对大批量更新,拆分执行; - 修复 FreeSql.IInsert ClearData 重复利用的 bug(使用 IgnoreColumns 进行大批量插入时会发生);
This commit is contained in:
@ -16,7 +16,7 @@ namespace FreeSql.DataAnnotations {
|
||||
/// </summary>
|
||||
public string DbType { get; set; }
|
||||
|
||||
internal bool? _IsPrimary, _IsIdentity, _IsNullable, _IsIgnore;
|
||||
internal bool? _IsPrimary, _IsIdentity, _IsNullable, _IsIgnore, _IsVersion;
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
@ -33,6 +33,10 @@ namespace FreeSql.DataAnnotations {
|
||||
/// 忽略此列,不迁移、不插入
|
||||
/// </summary>
|
||||
public bool IsIgnore { get => _IsIgnore ?? false; set => _IsIgnore = value; }
|
||||
/// <summary>
|
||||
/// 设置行锁(乐观锁)版本号,每次更新累加版本号,若更新整个实体时会附带当前的版本号判断(修改失败时抛出异常)
|
||||
/// </summary>
|
||||
public bool IsVersion { get => _IsVersion ?? false; set => _IsVersion = value; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库默认值
|
||||
|
Reference in New Issue
Block a user