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(new Student() { Name = "a" }).AddQueue(); db.Insertable(new Student() { Name = "b" }).AddQueue(); var x= db.SaveQueues(); db.Insertable(new Student() { Name = "a" }).AddQueue(); db.Insertable(new Student() { Name = "b" }).AddQueue(); db.Insertable(new Student() { Name = "c" }).AddQueue(); db.Insertable(new Student() { Name = "d" }).AddQueue(); var ar = db.SaveQueuesAsync(); ar.Wait(); db.Queryable().AddQueue(); db.Queryable().AddQueue(); var result = db.SaveQueues(); db.Queryable().AddQueue(); db.Queryable().AddQueue(); db.AddQueue("select @id", new { id = 1 }); var result2 = db.SaveQueues(); db.AddQueue("select 1"); db.AddQueue("select 2"); db.AddQueue("select 3"); db.AddQueue("select 4"); db.AddQueue("select 5"); db.AddQueue("select 6"); db.AddQueue("select 7"); var result3 = db.SaveQueues(); db.AddQueue("select 1"); var result4 = db.SaveQueues(); db.AddQueue("select 1"); db.AddQueue("select 2"); var result5 = db.SaveQueues(); db.AddQueue("select 1"); db.AddQueue("select 2"); db.AddQueue("select 3"); var result6 = db.SaveQueuesAsync(); result6.Wait(); } } }