forked from dotnetcore/FreeSql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/dotnetcore/FreeSql
- Loading branch information
Showing
23 changed files
with
584 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: .NET Core Deploy Docfx | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
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: 5.0.202 | ||
- name: Exclude example projects | ||
run: dotnet sln FreeSql.sln remove Examples/**/*.csproj FreeSql.Tests/**/*.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 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
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 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: | ||
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 | ||
force_orphan: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
/// <summary> | ||
/// 无参构造函数 | ||
/// </summary> | ||
public PagingInfo() | ||
{ | ||
} | ||
/// <summary> | ||
/// 当前为第1页,每页大小的构造函数 | ||
/// </summary> | ||
/// <param name="pageSize"></param> | ||
public PagingInfo(int pageSize) | ||
{ | ||
PageNumber = 1; | ||
PageSize = pageSize; | ||
} | ||
/// <summary> | ||
/// 带当前页和每页大小的构造函数 | ||
/// </summary> | ||
/// <param name="pageNumber"></param> | ||
/// <param name="pageSize"></param> | ||
public PagingInfo(int pageNumber, int pageSize) | ||
{ | ||
PageNumber = pageNumber; | ||
PageSize = pageSize; | ||
} | ||
/// <summary> | ||
/// 当前有多少页【只读】 | ||
/// </summary> | ||
public long PageCount => PageSize == 0 ? 0 : (Count + PageSize - 1) / PageSize; | ||
/// <summary> | ||
/// 是否有上一页【只读】 | ||
/// </summary> | ||
public bool HasPrevious => PageNumber > 1 && PageNumber <= PageCount; | ||
/// <summary> | ||
/// 是否有下一页【只读】 | ||
/// </summary> | ||
public bool HasNext => PageNumber < PageCount; | ||
/// <summary> | ||
/// 是否在第一页【只读】 | ||
/// </summary> | ||
public bool IsFrist => PageNumber == 1; | ||
/// <summary> | ||
/// 是否在最后一页【只读】 | ||
/// </summary> | ||
public bool IsLast => PageNumber == PageCount; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
/// <summary> | ||
/// 无参构造函数 | ||
/// </summary> | ||
public PagingInfo() | ||
{ | ||
} | ||
/// <summary> | ||
/// 当前为第1页,每页大小的构造函数 | ||
/// </summary> | ||
/// <param name="pageSize"></param> | ||
public PagingInfo(int pageSize) | ||
{ | ||
PageNumber = 1; | ||
PageSize = pageSize; | ||
} | ||
/// <summary> | ||
/// 带当前页和每页大小的构造函数 | ||
/// </summary> | ||
/// <param name="pageNumber"></param> | ||
/// <param name="pageSize"></param> | ||
public PagingInfo(int pageNumber, int pageSize) | ||
{ | ||
PageNumber = pageNumber; | ||
PageSize = pageSize; | ||
} | ||
/// <summary> | ||
/// 当前有多少页【只读】 | ||
/// </summary> | ||
public long PageCount => PageSize == 0 ? 0 : (Count + PageSize - 1) / PageSize; | ||
/// <summary> | ||
/// 是否有上一页【只读】 | ||
/// </summary> | ||
public bool HasPrevious => PageNumber > 1 && PageNumber <= PageCount; | ||
/// <summary> | ||
/// 是否有下一页【只读】 | ||
/// </summary> | ||
public bool HasNext => PageNumber < PageCount; | ||
/// <summary> | ||
/// 是否在第一页【只读】 | ||
/// </summary> | ||
public bool IsFrist => PageNumber == 1; | ||
/// <summary> | ||
/// 是否在最后一页【只读】 | ||
/// </summary> | ||
public bool IsLast => PageNumber == PageCount; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace FreeSql.Internal.Model | ||
{ | ||
/// <summary> | ||
/// 分页信息 | ||
/// </summary> | ||
public class BasePagingInfo | ||
{ | ||
/// <summary> | ||
/// 第几页,从1开始 | ||
/// </summary> | ||
public int PageNumber { get; set; } | ||
/// <summary> | ||
/// 每页多少 | ||
/// </summary> | ||
public int PageSize { get; set; } | ||
/// <summary> | ||
/// 查询的记录数量 | ||
/// </summary> | ||
public long Count { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.