mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Update Demo
This commit is contained in:
parent
79e314f051
commit
d0a4c35084
Binary file not shown.
41
Src/Asp.Net/SqliteTest/Demos/H_Queue.cs
Normal file
41
Src/Asp.Net/SqliteTest/Demos/H_Queue.cs
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
using OrmTest.Demo;
|
||||||
|
using OrmTest.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OrmTest.Demo
|
||||||
|
{
|
||||||
|
public class Queue : DemoBase
|
||||||
|
{
|
||||||
|
public static void Init()
|
||||||
|
{
|
||||||
|
var db = GetInstance();
|
||||||
|
db.Insertable<Student>(new Student() { Name = "a" }).AddQueue();
|
||||||
|
db.Insertable<Student>(new Student() { Name = "b" }).AddQueue();
|
||||||
|
var x= db.SaveQueues();
|
||||||
|
|
||||||
|
db.Insertable<Student>(new Student() { Name = "a" }).AddQueue();
|
||||||
|
db.Insertable<Student>(new Student() { Name = "b" }).AddQueue();
|
||||||
|
db.Insertable<Student>(new Student() { Name = "c" }).AddQueue();
|
||||||
|
db.Insertable<Student>(new Student() { Name = "d" }).AddQueue();
|
||||||
|
var ar = db.SaveQueuesAsync();
|
||||||
|
ar.Wait();
|
||||||
|
|
||||||
|
|
||||||
|
db.Queryable<Student>().AddQueue();
|
||||||
|
db.Queryable<School>().AddQueue();
|
||||||
|
var result = db.SaveQueues<Student, School>();
|
||||||
|
|
||||||
|
db.Queryable<Student>().AddQueue();
|
||||||
|
db.Queryable<School>().AddQueue();
|
||||||
|
db.Queryable<School>().AddQueue();
|
||||||
|
var result2 = db.SaveQueues<Student, School, School>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
result6.Wait();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -45,6 +45,7 @@ namespace OrmTest
|
|||||||
OrmTest.Demo.ComplexModel.Init();
|
OrmTest.Demo.ComplexModel.Init();
|
||||||
OrmTest.Demo.CodeFirst.Init();
|
OrmTest.Demo.CodeFirst.Init();
|
||||||
OrmTest.Demo.Aop.Init();
|
OrmTest.Demo.Aop.Init();
|
||||||
|
OrmTest.Demo.Queue.Init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
<Compile Include="Demos\8_JoinSql.cs" />
|
<Compile Include="Demos\8_JoinSql.cs" />
|
||||||
<Compile Include="Demos\9_Aop.cs" />
|
<Compile Include="Demos\9_Aop.cs" />
|
||||||
<Compile Include="Demos\DemoBase.cs" />
|
<Compile Include="Demos\DemoBase.cs" />
|
||||||
|
<Compile Include="Demos\H_Queue.cs" />
|
||||||
<Compile Include="Models\DataTestInfo.cs" />
|
<Compile Include="Models\DataTestInfo.cs" />
|
||||||
<Compile Include="Models\DataTestInfo2.cs" />
|
<Compile Include="Models\DataTestInfo2.cs" />
|
||||||
<Compile Include="Models\Enum.cs" />
|
<Compile Include="Models\Enum.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user