From f605307269a61e1d5e7f1361517a5468ba7769c2 Mon Sep 17 00:00:00 2001 From: 28810 <28810@YEXIANGQIN> Date: Tue, 18 Dec 2018 21:00:54 +0800 Subject: [PATCH] update --- Docs/select.md | 14 +++++++------- readme.md | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Docs/select.md b/Docs/select.md index 1bd5ae45..6c6aa706 100644 --- a/Docs/select.md +++ b/Docs/select.md @@ -124,20 +124,20 @@ List t1 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList(); ### 返回 List + 导航属性的数据 ```csharp -List t5 = select.LeftJoin((a, b) => a.TypeGuid == b.Guid && b.Name == "111").ToList(); +List t2 = select.LeftJoin(a => a.Type.Guid == a.TestTypeInfoGuid).ToList(); //此时会返回普通字段 + 导航对象 Type 的数据 ``` ### 指定字段返回 ```csharp //返回一个字段 -List t2 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList(a => a.Id); +List t3 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList(a => a.Id); //返回匿名类 -List<匿名类> t3 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList(a => new { a.Id, a.Title }); +List<匿名类> t4 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList(a => new { a.Id, a.Title }); //返回元组 -List<(int, string)> t4 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList<(int, string)>("id, title"); +List<(int, string)> t5 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList<(int, string)>("id, title"); ``` ### 执行SQL返回数据 @@ -148,9 +148,9 @@ class xxx { public string Title2 { get; set; } } -List t3 = fsql.Ado.Query("select * from song"); -List<(int, string ,string)> t4 = fsql.Ado.Query<(int, string, string)>("select * from song"); -List t5 = fsql.Ado.Query("select * from song"); +List t6 = fsql.Ado.Query("select * from song"); +List<(int, string ,string)> t7 = fsql.Ado.Query<(int, string, string)>("select * from song"); +List t8 = fsql.Ado.Query("select * from song"); ``` # 更多文档整理中。。。 diff --git a/readme.md b/readme.md index 6e95c4c9..86a06bae 100644 --- a/readme.md +++ b/readme.md @@ -48,20 +48,20 @@ List t1 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList(); ### 返回 List + 导航属性的数据 ```csharp -List t5 = select.LeftJoin((a, b) => a.TypeGuid == b.Guid && b.Name == "111").ToList(); +List t2 = select.LeftJoin(a => a.Type.Guid == a.TestTypeInfoGuid).ToList(); //此时会返回普通字段 + 导航对象 Type 的数据 ``` ### 指定字段返回 ```csharp //返回一个字段 -List t2 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList(a => a.Id); +List t3 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList(a => a.Id); //返回匿名类 -List<匿名类> t3 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList(a => new { a.Id, a.Title }); +List<匿名类> t4 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList(a => new { a.Id, a.Title }); //返回元组 -List<(int, string)> t4 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList<(int, string)>("id, title"); +List<(int, string)> t5 = select.Where(a => a.Id > 0).Skip(100).Limit(200).ToList<(int, string)>("id, title"); ``` ### 执行SQL返回数据 @@ -72,9 +72,9 @@ class xxx { public string Title2 { get; set; } } -List t3 = fsql.Ado.Query("select * from song"); -List<(int, string ,string)> t4 = fsql.Ado.Query<(int, string, string)>("select * from song"); -List t5 = fsql.Ado.Query("select * from song"); +List t6 = fsql.Ado.Query("select * from song"); +List<(int, string ,string)> t7 = fsql.Ado.Query<(int, string, string)>("select * from song"); +List t8 = fsql.Ado.Query("select * from song"); ``` # 联表