Add attribute propertty IsOnlyIgnoreUpdate

This commit is contained in:
sunkaixuan
2019-05-31 20:22:27 +08:00
parent 19ab13134a
commit c2c1a013d5
6 changed files with 29 additions and 1 deletions

View File

@@ -38,6 +38,20 @@ namespace OrmTest
Dc=it.Int
}).ToSql().Key;
UValidate.Check(sql, "SELECT [Dc] AS [DcNull] , [Int] AS [Dc] FROM [UnitSelectTest]", "Queryable");
sql= Db.Updateable<UnitSelectTest2>(new UnitSelectTest2()).ToSql().Key;
}
public class UnitSelectTest2
{
[SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true)]
public decimal? DcNull { get; set; }
public decimal Dc { get; set; }
public int? IntNull { get; set; }
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
public decimal Int { get; set; }
}
public class UnitSelectTest