From 0f67763882ea8b71061d107f292c9b0148b16daa Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@users.noreply.github.com> Date: Thu, 11 Mar 2021 21:38:07 +0800 Subject: [PATCH 1/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4cfa8d365..b44fdc19c 100644 --- a/README.md +++ b/README.md @@ -206,7 +206,7 @@ constantine, L*y 58元、花花 88元、麦兜很乖 50元、网络来者 2000元、John 99.99元、alex 666元、bacongao 36元、无名 100元、Eternity 188元、无名 10元、⌒.Helper~..oO 66元、习惯与被习惯 100元、无名 100元、蔡易喋 88.88元、中讯科技 1000元、Good Good Work 24元、炽焰 6.6元、Nothing 100元、兰州天擎赵 500元、哈利路亚 300元、 无名 100元、蛰伏 99.99元、TCYM 66.66元、MOTA 5元、LDZXG 30元、Near 30元、建爽 66元、无名 200元、LambertWu 100元、无名 18.88元、乌龙 50元、无名 100元、陳怼怼 66.66元、陳怼怼 66.66元、丁淮 100元、李伟坚-Excel催化剂 100元、白狐 6.66元、她微笑的脸y 30元、Eternity²º²¹ 588元、夜归柴门 88元、蔡易喋 666.66元、 -*礼 10元、litrpa 88元、Alax CHOW 200元、Daily 66元、k\*t 66元、蓝 100元 +*礼 10元、litrpa 88元、Alax CHOW 200元、Daily 66元、k\*t 66元、蓝 100元、*菜 10元、生命如歌 1000元 > Thank you for your donation From cad97b37bac320ff72683273dd63d2fb562c5bbc Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@users.noreply.github.com> Date: Thu, 11 Mar 2021 21:38:55 +0800 Subject: [PATCH 2/9] Update README.zh-CN.md --- README.zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.zh-CN.md b/README.zh-CN.md index c5d9040ce..3873c4fd8 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -210,7 +210,7 @@ constantine, L*y 58元、花花 88元、麦兜很乖 50元、网络来者 2000元、John 99.99元、alex 666元、bacongao 36元、无名 100元、Eternity 188元、无名 10元、⌒.Helper~..oO 66元、习惯与被习惯 100元、无名 100元、蔡易喋 88.88元、中讯科技 1000元、Good Good Work 24元、炽焰 6.6元、Nothing 100元、兰州天擎赵 500元、哈利路亚 300元、 无名 100元、蛰伏 99.99元、TCYM 66.66元、MOTA 5元、LDZXG 30元、Near 30元、建爽 66元、无名 200元、LambertWu 100元、无名 18.88元、乌龙 50元、无名 100元、陳怼怼 66.66元、陳怼怼 66.66元、丁淮 100元、李伟坚-Excel催化剂 100元、白狐 6.66元、她微笑的脸y 30元、Eternity²º²¹ 588元、夜归柴门 88元、蔡易喋 666.66元、 -*礼 10元、litrpa 88元、Alax CHOW 200元、Daily 66元、k*t 66元、蓝 100元 +*礼 10元、litrpa 88元、Alax CHOW 200元、Daily 66元、k*t 66元、蓝 100元、*菜 10元、生命如歌 1000元 > 超级感谢你的打赏。 From b6b9281f71c1a4210ed32dbc32dcee4ee5d03643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jian=E7=8E=84=E5=86=B0?= Date: Tue, 23 Mar 2021 16:50:29 +0800 Subject: [PATCH 3/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbyte[]=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E4=B9=90=E8=A7=82=E9=94=81=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FreeSql/Internal/CommonProvider/InsertProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FreeSql/Internal/CommonProvider/InsertProvider.cs b/FreeSql/Internal/CommonProvider/InsertProvider.cs index 1a1378b7d..5a2b62cb4 100644 --- a/FreeSql/Internal/CommonProvider/InsertProvider.cs +++ b/FreeSql/Internal/CommonProvider/InsertProvider.cs @@ -179,7 +179,7 @@ public static void AuditDataValue(object sender, T1 data, IFreeSql orm, TableInf } if (val == null && col.Attribute.MapType == typeof(string) && col.Attribute.IsNullable == false) col.SetValue(data, val = ""); - if (val == null && col.Attribute.MapType == typeof(byte[]) && col.Attribute.IsVersion) + if (col.Attribute.MapType == typeof(byte[]) && (val == null || (val is byte[] bytes && bytes.Length == 0)) && col.Attribute.IsVersion) col.SetValue(data, val = Utils.GuidToBytes(Guid.NewGuid())); } } From 0002cec8b4740f12ec5483a6be5f780fffebc88a Mon Sep 17 00:00:00 2001 From: KaneLeung Date: Tue, 30 Mar 2021 11:09:09 +0800 Subject: [PATCH 4/9] =?UTF-8?q?:rocket:=E5=A2=9E=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E6=A8=A1=E5=9E=8B=E5=88=86=E9=A1=B5=E5=8F=8A=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/SongController.cs | 11 ++++ Examples/repository_01/PagingInfo.cs | 57 +++++++++++++++++++ .../restful/Controllers/SongController.cs | 12 ++++ Examples/restful/PagingInfo.cs | 57 +++++++++++++++++++ FreeSql/FreeSql.xml | 27 +++++++++ FreeSql/Interface/Curd/ISelect/ISelect0.cs | 7 +++ .../SelectProvider/Select0Provider.cs | 7 +++ FreeSql/Internal/Model/BasePagingInfo.cs | 25 ++++++++ 8 files changed, 203 insertions(+) create mode 100644 Examples/repository_01/PagingInfo.cs create mode 100644 Examples/restful/PagingInfo.cs create mode 100644 FreeSql/Internal/Model/BasePagingInfo.cs diff --git a/Examples/repository_01/Controllers/SongController.cs b/Examples/repository_01/Controllers/SongController.cs index 4381d5750..a6bb50ded 100644 --- a/Examples/repository_01/Controllers/SongController.cs +++ b/Examples/repository_01/Controllers/SongController.cs @@ -63,6 +63,17 @@ public Task> GetItems([FromQuery] string key, [FromQuery] int page = return _songRepository.Select.WhereIf(!string.IsNullOrEmpty(key), a => a.Title.Contains(key)).Page(page, limit).ToListAsync(); } + /// + /// curl -X GET "http://localhost:5000/restapi/Songs/GetPagingItems?key=FreeSql&PageNumber=2&PageSize=10" -H "accept: text/plain" + /// + /// + /// + [HttpGet("GetPagingItems")] + public Task> GetPagingItems([FromQuery] string key, [FromQuery] PagingInfo pagingInfo) + { + return _songRepository.Select.WhereIf(!string.IsNullOrEmpty(key), a => a.Title.Contains(key)).Page(pagingInfo).ToListAsync(); + } + [HttpGet("{id}")] public Task GetItem([FromRoute] int id) { diff --git a/Examples/repository_01/PagingInfo.cs b/Examples/repository_01/PagingInfo.cs new file mode 100644 index 000000000..803ec20c4 --- /dev/null +++ b/Examples/repository_01/PagingInfo.cs @@ -0,0 +1,57 @@ +using FreeSql.Internal.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace repository_01 +{ + public class PagingInfo : BasePagingInfo + { + /// + /// 无参构造函数 + /// + public PagingInfo() + { + } + /// + /// 当前为第1页,每页大小的构造函数 + /// + /// + public PagingInfo(int pageSize) + { + PageNumber = 1; + PageSize = pageSize; + } + /// + /// 带当前页和每页大小的构造函数 + /// + /// + /// + public PagingInfo(int pageNumber, int pageSize) + { + PageNumber = pageNumber; + PageSize = pageSize; + } + /// + /// 当前有多少页【只读】 + /// + public long PageCount => PageSize == 0 ? 0 : (Count + PageSize - 1) / PageSize; + /// + /// 是否有上一页【只读】 + /// + public bool HasPrevious => PageNumber > 1 && PageNumber <= PageCount; + /// + /// 是否有下一页【只读】 + /// + public bool HasNext => PageNumber < PageCount; + /// + /// 是否在第一页【只读】 + /// + public bool IsFrist => PageNumber == 1; + /// + /// 是否在最后一页【只读】 + /// + public bool IsLast => PageNumber == PageCount; + } +} \ No newline at end of file diff --git a/Examples/restful/Controllers/SongController.cs b/Examples/restful/Controllers/SongController.cs index 0cd631ae9..989807796 100644 --- a/Examples/restful/Controllers/SongController.cs +++ b/Examples/restful/Controllers/SongController.cs @@ -25,6 +25,18 @@ public Task> GetItems([FromQuery] string key, [FromQuery] int page = return _fsql.Select().WhereIf(!string.IsNullOrEmpty(key), a => a.Title.Contains(key)).Page(page, limit).ToListAsync(); } + /// + /// curl -X GET "http://localhost:5000/restapi/Songs/GetPagingItems?key=FreeSql&PageNumber=2&PageSize=10" -H "accept: text/plain" + /// + /// + /// + /// + [HttpGet("GetPagingItems")] + public Task> GetPagingItems([FromQuery] string key, [FromQuery] PagingInfo pagingInfo) + { + return _fsql.Select().WhereIf(!string.IsNullOrEmpty(key), a => a.Title.Contains(key)).Page(pagingInfo).ToListAsync(); + } + [HttpGet("{id}")] public Task GetItem([FromRoute] int id) { diff --git a/Examples/restful/PagingInfo.cs b/Examples/restful/PagingInfo.cs new file mode 100644 index 000000000..ab52c1807 --- /dev/null +++ b/Examples/restful/PagingInfo.cs @@ -0,0 +1,57 @@ +using FreeSql.Internal.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace restful +{ + public class PagingInfo : BasePagingInfo + { + /// + /// 无参构造函数 + /// + public PagingInfo() + { + } + /// + /// 当前为第1页,每页大小的构造函数 + /// + /// + public PagingInfo(int pageSize) + { + PageNumber = 1; + PageSize = pageSize; + } + /// + /// 带当前页和每页大小的构造函数 + /// + /// + /// + public PagingInfo(int pageNumber, int pageSize) + { + PageNumber = pageNumber; + PageSize = pageSize; + } + /// + /// 当前有多少页【只读】 + /// + public long PageCount => PageSize == 0 ? 0 : (Count + PageSize - 1) / PageSize; + /// + /// 是否有上一页【只读】 + /// + public bool HasPrevious => PageNumber > 1 && PageNumber <= PageCount; + /// + /// 是否有下一页【只读】 + /// + public bool HasNext => PageNumber < PageCount; + /// + /// 是否在第一页【只读】 + /// + public bool IsFrist => PageNumber == 1; + /// + /// 是否在最后一页【只读】 + /// + public bool IsLast => PageNumber == PageCount; + } +} \ No newline at end of file diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml index ad59871ae..6d7acdfca 100644 --- a/FreeSql/FreeSql.xml +++ b/FreeSql/FreeSql.xml @@ -2136,6 +2136,13 @@ 每页多少 + + + 分页 + + 分页信息 + + 查询数据前,去重 @@ -3976,6 +3983,26 @@ + + + 分页信息 + + + + + 第几页,从1开始 + + + + + 每页多少 + + + + + 查询的记录数量 + + 当前操作的数据 diff --git a/FreeSql/Interface/Curd/ISelect/ISelect0.cs b/FreeSql/Interface/Curd/ISelect/ISelect0.cs index 1ecab5648..d17490da3 100644 --- a/FreeSql/Interface/Curd/ISelect/ISelect0.cs +++ b/FreeSql/Interface/Curd/ISelect/ISelect0.cs @@ -402,6 +402,13 @@ public partial interface ISelect0 : ISelect0 /// TSelect Page(int pageNumber, int pageSize); + /// + /// 分页 + /// + /// 分页信息 + /// + TSelect Page(BasePagingInfo pagingInfo); + /// /// 查询数据前,去重 /// diff --git a/FreeSql/Internal/CommonProvider/SelectProvider/Select0Provider.cs b/FreeSql/Internal/CommonProvider/SelectProvider/Select0Provider.cs index 74cfd9f34..d82980eb0 100644 --- a/FreeSql/Internal/CommonProvider/SelectProvider/Select0Provider.cs +++ b/FreeSql/Internal/CommonProvider/SelectProvider/Select0Provider.cs @@ -319,6 +319,13 @@ public TSelect Page(int pageNumber, int pageSize) return this.Limit(pageSize) as TSelect; } + public TSelect Page(BasePagingInfo pagingInfo) + { + pagingInfo.Count = this.Count(); + this.Skip(Math.Max(0, pagingInfo.PageNumber - 1) * pagingInfo.PageSize); + return this.Limit(pagingInfo.PageSize) as TSelect; + } + public TSelect Skip(int offset) { _skip = offset; diff --git a/FreeSql/Internal/Model/BasePagingInfo.cs b/FreeSql/Internal/Model/BasePagingInfo.cs new file mode 100644 index 000000000..2a48e5294 --- /dev/null +++ b/FreeSql/Internal/Model/BasePagingInfo.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace FreeSql.Internal.Model +{ + /// + /// 分页信息 + /// + public class BasePagingInfo + { + /// + /// 第几页,从1开始 + /// + public int PageNumber { get; set; } + /// + /// 每页多少 + /// + public int PageSize { get; set; } + /// + /// 查询的记录数量 + /// + public long Count { get; set; } + } +} \ No newline at end of file From f2a22aa8958ccf7c14fdbff5e3ac519f148becfc Mon Sep 17 00:00:00 2001 From: KaneLeung Date: Tue, 30 Mar 2021 11:45:59 +0800 Subject: [PATCH 5/9] =?UTF-8?q?:rocket:=E8=A1=A5=E5=85=85ISelectGrouping?= =?UTF-8?q?=E7=9A=84=E5=88=86=E9=A1=B5=E6=A8=A1=E5=9E=8B=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FreeSql/FreeSql.xml | 7 +++++++ FreeSql/Interface/Curd/ISelect/ISelectGrouping.cs | 10 +++++++++- .../SelectProvider/SelectGroupingProvider.cs | 8 ++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml index 6d7acdfca..892888fe7 100644 --- a/FreeSql/FreeSql.xml +++ b/FreeSql/FreeSql.xml @@ -2614,6 +2614,13 @@ 每页多少 + + + 分页 + + 分页信息 + + 查询的记录数量 diff --git a/FreeSql/Interface/Curd/ISelect/ISelectGrouping.cs b/FreeSql/Interface/Curd/ISelect/ISelectGrouping.cs index 295b7411d..c787cc612 100644 --- a/FreeSql/Interface/Curd/ISelect/ISelectGrouping.cs +++ b/FreeSql/Interface/Curd/ISelect/ISelectGrouping.cs @@ -1,4 +1,5 @@ -using System; +using FreeSql.Internal.Model; +using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Text; @@ -101,6 +102,13 @@ public interface ISelectGrouping /// ISelectGrouping Page(int pageNumber, int pageSize); + /// + /// 分页 + /// + /// 分页信息 + /// + ISelectGrouping Page(BasePagingInfo pagingInfo); + /// /// 查询的记录数量 /// diff --git a/FreeSql/Internal/CommonProvider/SelectProvider/SelectGroupingProvider.cs b/FreeSql/Internal/CommonProvider/SelectProvider/SelectGroupingProvider.cs index 09c524e00..68ca4c505 100644 --- a/FreeSql/Internal/CommonProvider/SelectProvider/SelectGroupingProvider.cs +++ b/FreeSql/Internal/CommonProvider/SelectProvider/SelectGroupingProvider.cs @@ -201,6 +201,14 @@ public ISelectGrouping Page(int pageNumber, int pageSize) return this; } + public ISelectGrouping Page(BasePagingInfo pagingInfo) + { + pagingInfo.Count = this.Count(); + _groupBySkip = Math.Max(0, pagingInfo.PageNumber - 1) * pagingInfo.PageSize; + _groupByLimit = pagingInfo.PageSize; + return this; + } + public long Count() => _select._cancel?.Invoke() == true ? 0 : long.TryParse(string.Concat(_orm.Ado.ExecuteScalar(_select._connection, _select._transaction, CommandType.Text, $"select count(1) from ({this.ToSql($"1{_comonExp._common.FieldAsAlias("as1")}")}) fta", _select._commandTimeout, _select._params.ToArray())), out var trylng) ? trylng : default(long); public ISelectGrouping Count(out long count) { From 1afcd22fab1b6dc5155fba7d803db8be655eb4f5 Mon Sep 17 00:00:00 2001 From: luoyunchong Date: Sat, 10 Apr 2021 20:27:52 +0800 Subject: [PATCH 6/9] add docfx support --- .github/workflows/docfx.yml | 37 +++++++++ docs/.gitignore | 15 ++++ docs/README.md | 14 ++++ docs/api/index.md | 2 + docs/docfx.json | 137 +++++++++++++++++++++++++++++++ docs/freesql/provider/index.md | 0 docs/freesql/repository/index.md | 2 + docs/images/logo.svg | 104 +++++++++++++++++++++++ docs/index.md | 11 +++ docs/toc.yml | 11 +++ 10 files changed, 333 insertions(+) create mode 100644 .github/workflows/docfx.yml create mode 100644 docs/.gitignore create mode 100644 docs/README.md create mode 100644 docs/api/index.md create mode 100644 docs/docfx.json create mode 100644 docs/freesql/provider/index.md create mode 100644 docs/freesql/repository/index.md create mode 100644 docs/images/logo.svg create mode 100644 docs/index.md create mode 100644 docs/toc.yml diff --git a/.github/workflows/docfx.yml b/.github/workflows/docfx.yml new file mode 100644 index 000000000..7bf08f0e4 --- /dev/null +++ b/.github/workflows/docfx.yml @@ -0,0 +1,37 @@ +name: .NET Core Deploy Docfx + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + generate-docs: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + - name: Install dependencies + run: dotnet restore + - name: Setup DocFX + uses: crazy-max/ghaction-chocolatey@v1 + with: + args: install docfx --version 2.56.7 + - name: DocFX Build + working-directory: docs + run: docfx docfx.json + continue-on-error: false + - name: Publish + if: github.event_name == 'push' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_site + cname: github.com + force_orphan: true diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 000000000..d5705ab89 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,15 @@ +############### +# folder # +############### +/**/DROP/ +/**/TEMP/ +/**/packages/ +/**/bin/ +/**/obj/ +_site +/freesql/provider/*.yml +/freesql/provider/.manifest +/freesql/repository/*.yml +/freesql/repository/.manifest +/api/*.yml +/api/.manifest \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..df64eec7b --- /dev/null +++ b/docs/README.md @@ -0,0 +1,14 @@ + +### DocFX +- https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html + + +run + +``` +docfx docfx_project\docfx.json --serve + +or + +docfx .\docfx.json --serve +``` \ No newline at end of file diff --git a/docs/api/index.md b/docs/api/index.md new file mode 100644 index 000000000..22d15855f --- /dev/null +++ b/docs/api/index.md @@ -0,0 +1,2 @@ +# FreeSql +TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*! diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 000000000..cad8bbd41 --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,137 @@ +{ + "metadata": [ + { + "src": [ + { + "files": [ + "FreeSql/*.csproj" + ], + "exclude": [ + "**/bin/**", + "**/obj/**" + ], + "src": "../" + } + ], + "dest": "api", + "disableGitFeatures": false, + "disableDefaultFilter": false + }, + { + "src": [ + { + "files": [ + "FreeSql.DbContext/*.csproj", + "FreeSql.Repository/*.csproj" + ], + "exclude": [ + "**/bin/**", + "**/obj/**" + ], + "src": "../" + } + ], + "dest": "freesql/repository", + "disableGitFeatures": false, + "disableDefaultFilter": false + }, + { + "src": [ + { + "files": [ + "Providers/FreeSql.Provider.MySql/*.csproj", + "Providers/FreeSql.Provider.Dameng/*.csproj", + "Providers/FreeSql.Provider.KingbaseES/*.csproj", + "Providers/FreeSql.Provider.MsAccess/*.csproj", + "Providers/FreeSql.Provider.MySqlConnector/*.csproj", + "Providers/FreeSql.Provider.Odbc/*.csproj", + "Providers/FreeSql.Provider.Oracle/*.csproj", + "Providers/FreeSql.Provider.PostgreSQL/*.csproj", + "Providers/FreeSql.Provider.ShenTong*.csproj", + "Providers/FreeSql.Provider.Sqlite/*.csproj", + "Providers/FreeSql.Provider.SqlServer/*.csproj", + "Providers/FreeSql.Provider.SqlServerForSystem/*.csproj" + ], + "exclude": [ + "**/bin/**", + "**/obj/**" + ], + "src": "../" + } + ], + "dest": "freesql/provider", + "disableGitFeatures": false, + "disableDefaultFilter": false + } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml", + "api/index.md" + ] + }, + { + "files": [ + "freesql/repository/**.yml", + "freesql/repository/index.md" + ] + }, + { + "files": [ + "freesql/provider/**.yml", + "freesql/provider/index.md" + ] + }, + { + "files": [ + "articles/**.md", + "articles/**/toc.yml", + "toc.yml", + "*.md" + ] + } + ], + "resource": [ + { + "files": [ + "images/**", + "styles/**" + ] + } + ], + "overwrite": [ + { + "files": [ + "Docs/**.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "dest": "_site", + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default" + ], + "globalMetadata": { + "_appTitle": "FreeSql API Docs", + "_appLogoPath": "./images/logo.svg", + "_gitContribute": { + "repo": "https://github.com/dotnetcore/freesql", + "branch": "master" + }, + "_enableSearch": true + }, + "postProcessors": [], + "markdownEngineName": "markdig", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false + } +} \ No newline at end of file diff --git a/docs/freesql/provider/index.md b/docs/freesql/provider/index.md new file mode 100644 index 000000000..e69de29bb diff --git a/docs/freesql/repository/index.md b/docs/freesql/repository/index.md new file mode 100644 index 000000000..726a58de0 --- /dev/null +++ b/docs/freesql/repository/index.md @@ -0,0 +1,2 @@ +# repository +TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*! diff --git a/docs/images/logo.svg b/docs/images/logo.svg new file mode 100644 index 000000000..0af3c5728 --- /dev/null +++ b/docs/images/logo.svg @@ -0,0 +1,104 @@ + + + + diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..f63cb3c64 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,11 @@ + +# FreeSql Document + +#### [http://freesql.net](http://freesql.net) + + + + .NET orm, Mysql orm, Postgresql orm, SqlServer orm, Oracle orm, Sqlite orm, Firebird orm, 达梦 orm, 人大金仓 orm, 神通 orm, MsAccess orm. + + - Github [https://github.com/dotnetcore/freesql](https://github.com/dotnetcore/freesql) + - Gitee [https://gitee.com/FreeSql/FreeSql-ORM](https://gitee.com/FreeSql/FreeSql-ORM) diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 000000000..e9b1d9621 --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,11 @@ +- name: FreeSql Documentation + href: api/ + homepage: api/index.md + +- name: Repository Documentation + href: freesql/repository/ + homepage: freesql/repository/index.md + +- name: Provider Documentation + href: freesql/provider/ + homepage: freesql/provider/index.md From ad40c8adb4e4acb113d464357811eec0e2eb962f Mon Sep 17 00:00:00 2001 From: luoyunchong Date: Sat, 10 Apr 2021 20:47:33 +0800 Subject: [PATCH 7/9] =?UTF-8?q?fix=20Examples=20=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docfx.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docfx.yml b/.github/workflows/docfx.yml index 7bf08f0e4..c725a6a04 100644 --- a/.github/workflows/docfx.yml +++ b/.github/workflows/docfx.yml @@ -7,9 +7,27 @@ on: branches: [master] jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + - name: Exclude example projects + run: dotnet sln FreeSql.sln remove (ls -r Examples/**/*.csproj) + - name: Install dependencies + run: dotnet restore + - name: Build solution + run: dotnet build --configuration Release --no-restore + generate-docs: runs-on: windows-latest - + needs: build + steps: - name: Checkout uses: actions/checkout@v2 @@ -18,7 +36,7 @@ jobs: with: dotnet-version: 3.1.101 - name: Install dependencies - run: dotnet restore + run: dotnet sln FreeSql.sln remove (ls -r Examples/**/*.csproj);dotnet restore - name: Setup DocFX uses: crazy-max/ghaction-chocolatey@v1 with: From e6fd68206ee2207a5942cdf4df092ed262abf8be Mon Sep 17 00:00:00 2001 From: IGeekFan Date: Sat, 10 Apr 2021 20:54:04 +0800 Subject: [PATCH 8/9] Update docfx.yml --- .github/workflows/docfx.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docfx.yml b/.github/workflows/docfx.yml index c725a6a04..d22110a43 100644 --- a/.github/workflows/docfx.yml +++ b/.github/workflows/docfx.yml @@ -18,7 +18,7 @@ jobs: with: dotnet-version: 3.1.101 - name: Exclude example projects - run: dotnet sln FreeSql.sln remove (ls -r Examples/**/*.csproj) + run: dotnet sln FreeSql.sln remove Examples/**/*.csproj - name: Install dependencies run: dotnet restore - name: Build solution @@ -51,5 +51,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/_site - cname: github.com force_orphan: true From 7206d394176626e483dd97ac780033ce1c1e4d30 Mon Sep 17 00:00:00 2001 From: IGeekFan Date: Sat, 10 Apr 2021 21:56:53 +0800 Subject: [PATCH 9/9] Update docfx.yml --- .github/workflows/docfx.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docfx.yml b/.github/workflows/docfx.yml index d22110a43..8cca960d0 100644 --- a/.github/workflows/docfx.yml +++ b/.github/workflows/docfx.yml @@ -16,9 +16,9 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.101 + dotnet-version: 5.0.202 - name: Exclude example projects - run: dotnet sln FreeSql.sln remove Examples/**/*.csproj + run: dotnet sln FreeSql.sln remove Examples/**/*.csproj FreeSql.Tests/**/*.csproj - name: Install dependencies run: dotnet restore - name: Build solution @@ -34,9 +34,13 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.101 + dotnet-version: 5.0.202 + - name: Remove Examples + run: dotnet sln FreeSql.sln remove (ls -r Examples/**/*.csproj) + - name: Remove FreeSql.Tests + run: dotnet sln FreeSql.sln remove (ls -r FreeSql.Tests/**/*.csproj) - name: Install dependencies - run: dotnet sln FreeSql.sln remove (ls -r Examples/**/*.csproj);dotnet restore + run: dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org --configfile $env:APPDATA\NuGet\NuGet.Config && dotnet restore - name: Setup DocFX uses: crazy-max/ghaction-chocolatey@v1 with: