修复 IsIgnore 过滤字段后,查询的错误;

This commit is contained in:
28810
2019-04-18 11:21:12 +08:00
parent b33536e4df
commit 8d266a556e
11 changed files with 60 additions and 4 deletions

View File

@ -1,5 +1,6 @@
using FreeSql.DataAnnotations;
using FreeSql.Tests.DataContext.SqlServer;
using System;
using Xunit;
namespace FreeSql.Tests.DataAnnotations {
@ -56,5 +57,22 @@ namespace FreeSql.Tests.DataAnnotations {
public string name { get; set; } = "defaultValue";
}
[Fact]
public void IsIgnore() {
var item = new TestIsIgnore { };
Assert.Equal(1, g.mysql.Insert<TestIsIgnore>().AppendData(item).ExecuteAffrows());
var find = g.mysql.Select<TestIsIgnore>().Where(a => a.id == item.id).First();
Assert.NotNull(find);
Assert.Equal(item.id, find.id);
}
class TestIsIgnore {
public Guid id { get; set; }
[Column(IsIgnore = true)]
public bool isignore { get; set; }
}
}
}