mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update demo
This commit is contained in:
parent
c6d9a19fcd
commit
738415ea85
@ -7,6 +7,7 @@ using System.Text;
|
||||
namespace OrmTest
|
||||
{
|
||||
|
||||
[SugarTable("OrderTest01")]
|
||||
public class Order
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
|
@ -113,7 +113,10 @@ namespace KdbndpTest.SqlServerDemo
|
||||
private static void InitDatas(SqlSugarClient Db)
|
||||
{
|
||||
Db.DbMaintenance.CreateDatabase();
|
||||
Db.CodeFirst.InitTables<Order>();
|
||||
if (!Db.DbMaintenance.IsAnyTable(Db.EntityMaintenance.GetTableName<Order>(),false))
|
||||
{
|
||||
Db.CodeFirst.InitTables<Order>();
|
||||
}
|
||||
}
|
||||
|
||||
private static void InsertDemo(SqlSugarClient Db)
|
||||
|
Loading…
Reference in New Issue
Block a user