Acme.EFCore.Small
1.2.7
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Acme.EFCore.Small --version 1.2.7
NuGet\Install-Package Acme.EFCore.Small -Version 1.2.7
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="Acme.EFCore.Small" Version="1.2.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Acme.EFCore.Small" Version="1.2.7" />
<PackageReference Include="Acme.EFCore.Small" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Acme.EFCore.Small --version 1.2.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Acme.EFCore.Small, 1.2.7"
#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.
#addin nuget:?package=Acme.EFCore.Small&version=1.2.7
#tool nuget:?package=Acme.EFCore.Small&version=1.2.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Acme.EFCore.Small
一、概述
Acme.EFCore.Small是一款轻量级的EFCore通用类库,旨在使用 Entity Framework Core(EFCore)与数据库进行交互。它作为处理各种数据库操作的基础组件。 版本:v
二、入门指南
1.安装Acme.EFCore.Small
创建项目 → 点击引用 → 右键 → 管理Nuget程序包->搜索Acme.EFCore.Small选择对应版本的.NET版本安装即可。
2.安装对应数据库包
- SqlServer:
Microsoft.EntityFrameworkCore.SqlServer
- Sqlite:
Microsoft.EntityFrameworkCore.Sqlite
- Cosmos:
Microsoft.EntityFrameworkCore.Cosmos
- InMemoryDatabase:
Microsoft.EntityFrameworkCore.InMemory
- MySql:
Pomelo.EntityFrameworkCore.MySql
MySql.EntityFrameworkCore
- PostgreSQL:
Npgsql.EntityFrameworkCore.PostgreSQL
- Oracle:
Oracle.EntityFrameworkCore
- Firebird:
FirebirdSql.EntityFrameworkCore.Firebird
- Dm:
Microsoft.EntityFrameworkCore.Dm
4.创建DbContext数据库上下文类
public class AppDbContext : DbContext
{
/// <summary>
/// 初始化数据库上下文
/// </summary>
/// <param name="options"></param>
public AppDbContext(DbContextOptions<AppDbContext> options) :
base(options)
{
}
}
5.配置连接字符串
{
"ConnectionStrings":{
"DefaultConnection": "Persist Security Info=False;Data Source=.;Initial Catalog=数据库名;User ID=用户;Password=密码;Connect Timeout=120;Encrypt=False;"
}
}
6.依赖注入
6.1.基础配置
//调用数据库配置信息
services.AddDbContext<AppDbContext1>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
services.AddBaseService();
6.2.使用EF操作数据库
待更新
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Microsoft.EntityFrameworkCore (>= 7.0.20)
-
net7.0
- Microsoft.EntityFrameworkCore (>= 7.0.20)
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.8)
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.3.2 | 112 | 5/30/2025 |
1.3.1 | 143 | 5/7/2025 |
1.3.0 | 140 | 4/27/2025 |
1.3.0-beta | 153 | 4/18/2025 |
1.2.9 | 156 | 3/13/2025 |
1.2.8.9 | 213 | 3/6/2025 |
1.2.8.5 | 107 | 2/22/2025 |
1.2.8.4 | 113 | 2/7/2025 |
1.2.8.3 | 219 | 12/25/2024 |
1.2.8.3-alpha | 115 | 12/25/2024 |
1.2.8.2 | 138 | 12/20/2024 |
1.2.8.1 | 126 | 12/19/2024 |
1.2.8 | 142 | 11/13/2024 |
1.2.7.2 | 152 | 11/7/2024 |
1.2.7.1 | 150 | 10/11/2024 |
1.2.7.1-alpha | 111 | 9/20/2024 |
1.2.7 | 141 | 10/11/2024 |
1.2.7-alpha | 120 | 9/20/2024 |
1.2.6 | 151 | 9/14/2024 |
1.2.5.9 | 172 | 8/9/2024 |
1.2.5.8 | 167 | 8/9/2024 |
1.2.5.7 | 161 | 7/19/2024 |
1.2.5.6 | 151 | 6/3/2024 |
1.2.5.6-rc | 131 | 5/30/2024 |
1.2.5.6-alpha | 147 | 5/29/2024 |
1.2.5.5 | 138 | 6/3/2024 |
1.2.5.5-alpha | 140 | 5/29/2024 |
1.2.5.4 | 159 | 5/29/2024 |
1.2.5.3 | 147 | 5/29/2024 |
1.2.5.2 | 158 | 5/11/2024 |
1.2.5.1 | 183 | 4/22/2024 |
1.2.5 | 167 | 4/22/2024 |
1.2.4.9 | 173 | 4/22/2024 |
1.2.4.8 | 154 | 4/19/2024 |
1.2.4.7 | 163 | 4/11/2024 |
1.2.4.6 | 166 | 4/10/2024 |
1.2.4.5 | 165 | 4/10/2024 |
1.2.4.4 | 170 | 4/9/2024 |
1.2.4.3 | 162 | 4/9/2024 |
1.2.4.2 | 161 | 4/8/2024 |
1.2.4.1 | 180 | 4/7/2024 |
1.2.3.9 | 165 | 4/7/2024 |
1.2.3.8 | 174 | 4/8/2024 |
1.2.3.7 | 154 | 4/9/2024 |
1.2.3.6 | 151 | 4/9/2024 |
1.2.3.5 | 176 | 4/8/2024 |
1.2.3.4 | 168 | 4/8/2024 |
1.2.3.3 | 169 | 4/8/2024 |
1.2.3.2 | 171 | 4/7/2024 |
1.2.3.1 | 168 | 4/7/2024 |
1.2.3 | 175 | 4/7/2024 |
1.2.2.9 | 168 | 4/7/2024 |
1.2.2.8 | 169 | 4/7/2024 |
1.2.2.7 | 164 | 4/7/2024 |
1.2.2.6 | 179 | 4/2/2024 |
1.2.2.5 | 168 | 4/2/2024 |
1.2.2.4 | 181 | 3/29/2024 |
1.2.2.3 | 171 | 3/29/2024 |
1.2.2.2 | 164 | 3/27/2024 |
1.2.2.1 | 184 | 3/27/2024 |
1.2.1 | 166 | 3/27/2024 |
1.2.0.9 | 179 | 3/26/2024 |
1.2.0.8 | 177 | 3/26/2024 |
1.2.0.7 | 167 | 3/26/2024 |
1.2.0.6 | 188 | 3/26/2024 |
1.2.0.5 | 175 | 3/26/2024 |
1.2.0.4 | 183 | 3/25/2024 |
1.2.0.3 | 173 | 3/25/2024 |
1.2.0.2 | 177 | 3/25/2024 |
1.2.0.1 | 172 | 3/20/2024 |
1.1.0.5 | 167 | 3/25/2024 |
1.1.0.1 | 190 | 3/20/2024 |
1.0.5 | 138 | 12/20/2024 |
1.0.4 | 134 | 12/19/2024 |
1.0.3.9 | 163 | 4/19/2024 |
1.0.3.8 | 160 | 4/19/2024 |
1.0.3.7 | 162 | 4/19/2024 |
1.0.3.6 | 164 | 4/19/2024 |
1.0.3.5 | 191 | 4/7/2024 |
1.0.3.4 | 180 | 4/7/2024 |
1.0.3.3 | 170 | 4/2/2024 |
1.0.3.2 | 178 | 4/2/2024 |
1.0.3.1 | 178 | 3/31/2024 |
1.0.0.1 | 178 | 3/20/2024 |
只支持一个Base服务类