- 优化 没有主键的实体,约定 id 命名的属性上若设置了 IsPrimary = false,则其不属于约定主键;

This commit is contained in:
28810
2019-12-19 11:22:19 +08:00
parent a23a49163e
commit eb4bbd9448
3 changed files with 174 additions and 134 deletions

View File

@ -43,7 +43,21 @@ namespace FreeSql.Tests
// fsql.Select<ut3_t1>().ToList();
//}
var tb1 = g.sqlite.CodeFirst.GetTableByEntity(typeof(pkfalse_t1));
var tb2 = g.sqlite.CodeFirst.GetTableByEntity(typeof(pkfalse_t2));
}
class pkfalse_t1
{
[Column(IsPrimary = false)]
public int id { get; set; }
}
class pkfalse_t2
{
[Column(IsPrimary = true)]
public int id { get; set; }
}
class ut3_t1