- 修复 CodeFirst IsPrimary NOT NULL 生成,sqlite 可以插入 NULL 到主键;

This commit is contained in:
2881099
2022-08-26 15:38:34 +08:00
parent aa35f92a13
commit d154a463a5
3 changed files with 233 additions and 185 deletions

View File

@ -322,6 +322,16 @@ namespace base_entity
{
public static int fsql;
}
class StringNulable
{
[Column(IsPrimary = true)]
public string id { get; set; }
[Column(StringLength = -1, IsNullable = true)]
public string code1 { get; set; }
[Column(StringLength = -1, IsNullable = false)]
public string code2 { get; set; }
}
static void Main(string[] args)
{
@ -379,6 +389,8 @@ namespace base_entity
#endregion
var ddlsql01 = fsql.CodeFirst.GetComparisonDDLStatements<StringNulable>();
Expression<Func<HzyTuple<User1, Group, Group, Group, Group, Group>, bool>> where = null;
where = where.Or(a => a.t6.Index > 0);
where = where.Or(a => a.t5.Index > 0);