mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-26 10:49:20 +08:00
Add CodeFirst.SetStringDefaultLength
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user