- 优化 Aop.AuditValue 审计过的值,IUpdate.UpdateColumns 即使不指定该列也会更新;

This commit is contained in:
28810
2019-10-29 09:55:54 +08:00
parent f7633e9f67
commit 97351a4e6e
6 changed files with 62 additions and 17 deletions

View File

@ -408,6 +408,7 @@ namespace FreeSql.Tests
{
public Guid? Id { get; set; }
public string xxx { get; set; }
public string yyy { get; set; }
}
public class TestAddEnum
{
@ -420,6 +421,18 @@ namespace FreeSql.Tests
[Fact]
public void Test1()
{
//g.mysql.Aop.AuditValue += (_, e) =>
//{
// if (e.AuditValueType == FreeSql.Aop.AuditValueType.Update)
// {
// if (e.Property.Name == "xxx")
// e.Value = "xxx";
// }
//};
//var tttee = g.mysql.Select<TestGuidId>().Limit(5).ToList();
//g.mysql.GetGuidRepository<TestGuidId>().UpdateDiy.SetSource(tttee).UpdateColumns(a => new { a.yyy }).NoneParameter().ExecuteAffrows();
//g.mysql.GlobalFilter
// .Apply<TestAddEnum>("test1", a => a.Id == TenrantId.Value)
// .Apply<AuthorTest>("test2", a => a.Id == 111)