diff --git a/Src/Asp.Net/SqlServerTest/Demo/Demo1_Queryable.cs b/Src/Asp.Net/SqlServerTest/Demo/Demo1_Queryable.cs index b2d929dcf..f08c9f683 100644 --- a/Src/Asp.Net/SqlServerTest/Demo/Demo1_Queryable.cs +++ b/Src/Asp.Net/SqlServerTest/Demo/Demo1_Queryable.cs @@ -27,9 +27,12 @@ namespace OrmTest private static void ConfiQuery() { var db = GetInstance(); - db.ConfigQuery.SetTable(it=>it.Id ,it=>it.Name,"01",it=>it.Id>1); - db.ConfigQuery.SetTable(it => it.Id, it => it.Name, "02", it => it.Id > 2); - db.ConfigQuery.SetTable(it => it.Id, it => it.Name,null); + if (!db.ConfigQuery.Any()) + { + db.ConfigQuery.SetTable(it => it.Id, it => it.Name, "01", it => it.Id > 1); + db.ConfigQuery.SetTable(it => it.Id, it => it.Name, "02", it => it.Id > 2); + db.ConfigQuery.SetTable(it => it.Id, it => it.Name, null); + } var list = db.Queryable().Select(it => new OrderItem { ItemId = it.ItemId.SelectAll(),