mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 优化 没有主键的实体,约定 id 命名的属性上若设置了 IsPrimary = false,则其不属于约定主键;
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user