Add CodeFirst.SetStringDefaultLength

This commit is contained in:
sunkaixuan
2018-11-11 16:10:45 +08:00
parent 46b1350b54
commit 221eac6dcb
3 changed files with 17 additions and 2 deletions

View File

@@ -15,7 +15,6 @@ namespace OrmTest.Demo
public int Id { get; set; }
[SugarColumn(Length = 21,OldColumnName = "Name2")]
public string Name{ get; set; }
[SugarColumn(IsNullable = true,Length =10)]
public string IsOk { get; set; }
public Guid Guid { get; set; }
[SugarColumn(ColumnDataType ="int")]
@@ -51,7 +50,7 @@ namespace OrmTest.Demo
//db.CodeFirst.BackupTable().InitTables(typeof(CodeTable),typeof(CodeTable2));
//No backup table
db.CodeFirst.InitTables(typeof(CodeTable),typeof(CodeTable2));
db.CodeFirst.SetStringDefaultLength(10).InitTables(typeof(CodeTable),typeof(CodeTable2));
}
}
}