mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-25 01:14:33 +08:00
Add demo
This commit is contained in:
parent
f765c2164e
commit
ab13a60961
@ -42,9 +42,18 @@ namespace OrmTest
|
|||||||
Name = it.CreateTime.HasValue ? it.CreateTime.Value.ToString("yyyy-MM-dd") : string.Empty
|
Name = it.CreateTime.HasValue ? it.CreateTime.Value.ToString("yyyy-MM-dd") : string.Empty
|
||||||
}).ToList();
|
}).ToList();
|
||||||
db.CodeFirst.InitTables<CodeFirstimg>();
|
db.CodeFirst.InitTables<CodeFirstimg>();
|
||||||
|
if (db.DbMaintenance.IsAnyTable("CodeFirstMaxString1",false))
|
||||||
|
db.DbMaintenance.DropTable<CodeFirstMaxString1>();
|
||||||
|
db.CodeFirst.InitTables<CodeFirstMaxString1>();
|
||||||
Console.WriteLine("#### CodeFirst end ####");
|
Console.WriteLine("#### CodeFirst end ####");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public class CodeFirstMaxString1
|
||||||
|
{
|
||||||
|
[SugarColumn(ColumnDataType = StaticConfig.CodeFirt_BigString)]
|
||||||
|
public string img { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class CodeFirstimg
|
public class CodeFirstimg
|
||||||
{
|
{
|
||||||
[SugarColumn(Length =100)]
|
[SugarColumn(Length =100)]
|
||||||
|
Loading…
Reference in New Issue
Block a user