dotnet add package EFDbProvider.EntityFramework --version
NuGet\Install-Package EFDbProvider.EntityFramework -Version
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EFDbProvider.EntityFramework" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EFDbProvider.EntityFramework --version
#r "nuget: EFDbProvider.EntityFramework,"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EFDbProvider.EntityFramework as a Cake Addin
#addin nuget:?package=EFDbProvider.EntityFramework&version=

// Install EFDbProvider.EntityFramework as a Cake Tool
#tool nuget:?package=EFDbProvider.EntityFramework&version=

针对Ef6的仓储实现。EF+工作单元+Ado.Net。 特点: 1)每一个仓储实例就是一个工作单元,执行完数据库操作后统一提交数据,不用另外开关事务; 2)EF常规操作; 3)执行Sql语句查询返回DataTable并翻页; 4)Ado.Net执行Sql语句,并与仓储实例在同一个事务内。

如何使用? 1、创建DbContext。例如叫 MsSqlContext 2、创建仓储接口。例如叫 IRepositoryStore

public interface IRepositoryStore : IRepositoryBaseStore<DbContext>

3、实现仓储接口。例如叫 RepositoryStore

public class RepositoryStore : RepositoryBaseStore<DbContext>, IRepositoryStore
    public RepositoryStore(MsSqlContext context) : base(context)


public class Model1 : IEntity
    public int Id { get; set; }

    public object EfKeyId => Id;

5、使用 获取到仓储实例。(可以直接new,也可以注入) IRepositoryStore dbStore = new RepositoryStore(new MsSqlContext("ConnName"));

dbStore.Add(model1); dbStore.Update(model2);

//获取 DbContext var context = dbStore.Context;

//获取Ado.Net操作类,此操作类和dbStore是在同一个事务中。 var sqlHelper = dbStore.Context.SqlHelper();


//最后再统一提交数据 var result = await dbStore.CommitAsync();

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated 1,332 1/30/2018