-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from luodaoyi/origin
升级到 支持efcore3.1 添加sqlite支持
- Loading branch information
Showing
22 changed files
with
252 additions
and
76 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
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
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,23 @@ | ||
|
||
-- ---------------------------- | ||
-- Table structure for school | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS School; | ||
CREATE TABLE School ( | ||
Id CHAR(32) PRIMARY KEY | ||
NOT NULL, | ||
Name VARCHAR (255) | ||
); | ||
|
||
-- ---------------------------- | ||
-- Table structure for student | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS Student; | ||
CREATE TABLE Student ( | ||
Id CHAR(32) NOT NULL | ||
PRIMARY KEY, | ||
Name VARCHAR (255), | ||
Age INT, | ||
Birthday DATETIME, | ||
SchoolId CHAR (32) | ||
); |
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,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Leo.Chimp.DapperAdapter | ||
{ | ||
public class SqliteAdapter : ISqlAdapter | ||
{ | ||
public virtual string PagingBuild(ref PartedSql partedSql, object args, long skip, long take) | ||
{ | ||
var pageSql = $"{partedSql.Raw} LIMIT {take} OFFSET {skip}"; | ||
return pageSql; | ||
} | ||
|
||
} | ||
} |
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 |
---|---|---|
|
@@ -19,7 +19,8 @@ public class KingOptions | |
public enum DbType | ||
{ | ||
MSSQL, | ||
MYSQL | ||
MYSQL, | ||
SQLITE | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1,22 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<PackageProjectUrl>https://github.com/longxianghui/chimp</PackageProjectUrl> | ||
<TargetFramework>netstandard2.1</TargetFramework> | ||
<PackageProjectUrl>https://github.com/luodaoyi/chimp</PackageProjectUrl> | ||
<LangVersion>7.3</LangVersion> | ||
<Version>2.1.2</Version> | ||
<Authors>longxianghui</Authors> | ||
<Version>3.0.0</Version> | ||
<Authors>luodaoyi</Authors> | ||
<Description>ef and dapper repository.</Description> | ||
<PackageTags>repository;unit of work;ef;dapper;</PackageTags> | ||
<RepositoryUrl>https://github.com/longxianghui/chimp</RepositoryUrl> | ||
<RepositoryUrl>https://github.com/luodaoyi/chimp</RepositoryUrl> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Dapper" Version="2.0.30" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.11" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.11" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.1.0" /> | ||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.4" /> | ||
<PackageReference Include="Dapper" Version="2.0.35" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.7" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.7" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.7" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="3.1.6" /> | ||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.2" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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.