Acme.EFCore.Small 1.2.4.9

There is a newer version of this package available.
See the version list below for details.
dotnet add package Acme.EFCore.Small --version 1.2.4.9
NuGet\Install-Package Acme.EFCore.Small -Version 1.2.4.9
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.4.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Acme.EFCore.Small --version 1.2.4.9
#r "nuget: Acme.EFCore.Small, 1.2.4.9"
#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 Acme.EFCore.Small as a Cake Addin
#addin nuget:?package=Acme.EFCore.Small&version=1.2.4.9

// Install Acme.EFCore.Small as a Cake Tool
#tool nuget:?package=Acme.EFCore.Small&version=1.2.4.9

Acme.EFCore.Small

一、概述

Acme.EFCore.Small是一款轻量级的EFCore通用类库,旨在使用 Entity Framework Core(EFCore)与数据库进行交互。它作为处理各种数据库操作的基础组件。

二、安装教程

1.安装Acme.EFCore.Small

创建项目 → 点击引用 → 右键 → 管理Nuget程序包->搜索Acme.EFCore.Small选择对应版本的.NET版本安装即可。

2.安装对应数据库包

<ul> <li>SqlServer:Microsoft.EntityFrameworkCore.SqlServer</li> <li>Sqlite:Microsoft.EntityFrameworkCore.Sqlite</li> <li>Cosmos:Microsoft.EntityFrameworkCore.Cosmos</li> <li>InMemoryDatabase:Microsoft.EntityFrameworkCore.InMemory</li> <li> MySql: <ul> <li>Pomelo.EntityFrameworkCore.MySql</li> <li>MySql.EntityFrameworkCore</li> </ul> </li> <li>PostgreSQL:Npgsql.EntityFrameworkCore.PostgreSQL</li> <li>Oracle:Oracle.EntityFrameworkCore</li> <li>Firebird:FirebirdSql.EntityFrameworkCore.Firebird</li> <li>Dm:Microsoft.EntityFrameworkCore.Dm</li> </ul>

使用

1.创建DbContext数据库上下文类

<pre><code class="c#"> public class AppDbContext : DbContext { public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { } } </code></pre>

2.配置连接字符串

<pre><code class="json">{ "ConnectionStrings":{ "DefaultConnection": "Persist Security Info=False;Data Source=.;Initial Catalog=数据库名;User ID=用户;Password=密码;Connect Timeout=120;Encrypt=False;" } } </code></pre>

3.依赖注入(需要哪个注入哪个)

<pre> <code class="c#"> //调用数据库配置信息 services.AddDbContext<AppDbContext>(options ⇒ options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"))); //注入基础类IBaseService services.AddScoped<IBaseService, BaseService<AppDbContext>>(); //注入仓储类 services.AddRepository(); //注入静态Db类 services.AddDbExtension(); </code> </pre>

更多内容请期待

Product 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. 
Compatible target framework(s)
Included target framework(s) (in 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.2.5.2 74 5/11/2024
1.2.5.1 94 4/22/2024
1.2.5 82 4/22/2024
1.2.4.9 83 4/22/2024
1.2.4.8 75 4/19/2024
1.2.4.7 80 4/11/2024
1.2.4.6 77 4/10/2024
1.2.4.5 79 4/10/2024
1.2.4.4 86 4/9/2024
1.2.4.3 80 4/9/2024
1.2.4.2 81 4/8/2024
1.2.4.1 92 4/7/2024
1.2.3.9 82 4/7/2024
1.2.3.8 93 4/8/2024
1.2.3.7 79 4/9/2024
1.2.3.6 74 4/9/2024
1.2.3.5 85 4/8/2024
1.2.3.4 84 4/8/2024
1.2.3.3 90 4/8/2024
1.2.3.2 89 4/7/2024
1.2.3.1 92 4/7/2024
1.2.3 85 4/7/2024
1.2.2.9 86 4/7/2024
1.2.2.8 89 4/7/2024
1.2.2.7 84 4/7/2024
1.2.2.6 91 4/2/2024
1.2.2.5 86 4/2/2024
1.2.2.4 94 3/29/2024
1.2.2.3 90 3/29/2024
1.2.2.2 89 3/27/2024
1.2.2.1 96 3/27/2024
1.2.1 85 3/27/2024
1.2.0.9 91 3/26/2024
1.2.0.8 92 3/26/2024
1.2.0.7 85 3/26/2024
1.2.0.6 97 3/26/2024
1.2.0.5 93 3/26/2024
1.2.0.4 96 3/25/2024
1.2.0.3 89 3/25/2024
1.2.0.2 96 3/25/2024
1.2.0.1 99 3/20/2024
1.1.0.5 91 3/25/2024
1.1.0.1 103 3/20/2024
1.0.3.9 76 4/19/2024
1.0.3.8 77 4/19/2024
1.0.3.7 79 4/19/2024
1.0.3.6 80 4/19/2024
1.0.3.5 88 4/7/2024
1.0.3.4 96 4/7/2024
1.0.3.3 93 4/2/2024
1.0.3.2 95 4/2/2024
1.0.3.1 94 3/31/2024
1.0.0.1 96 3/20/2024

更新readme.md,请期待完成版(技术支持联系邮箱:yzxs949@163.com)