mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add demo
This commit is contained in:
parent
513741dcc1
commit
f0bba2dbcb
@ -3,6 +3,7 @@ using SqlSugar.DbConvert;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace OrmTest
|
namespace OrmTest
|
||||||
@ -34,9 +35,15 @@ namespace OrmTest
|
|||||||
db.Insertable(new CodeFirstTable22x2() { Name = "a" })
|
db.Insertable(new CodeFirstTable22x2() { Name = "a" })
|
||||||
.ExecuteCommand();
|
.ExecuteCommand();
|
||||||
var list2=db.Queryable<CodeFirstTable22x2>().ToList();
|
var list2=db.Queryable<CodeFirstTable22x2>().ToList();
|
||||||
|
db.CodeFirst.InitTables<CodeFirstUnitrew>();
|
||||||
|
db.Insertable(new CodeFirstUnitrew() { Index = 1 }).ExecuteCommand();
|
||||||
Console.WriteLine("#### CodeFirst end ####");
|
Console.WriteLine("#### CodeFirst end ####");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public class CodeFirstUnitrew
|
||||||
|
{
|
||||||
|
public int Index { get; set; }
|
||||||
|
}
|
||||||
[SugarTable("CodeFirstTable22r2")]
|
[SugarTable("CodeFirstTable22r2")]
|
||||||
public class CodeFirstTable22x2
|
public class CodeFirstTable22x2
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user