DotNetCore.CAP.MySql.Provider
0.0.1
dotnet add package DotNetCore.CAP.MySql.Provider --version 0.0.1
NuGet\Install-Package DotNetCore.CAP.MySql.Provider -Version 0.0.1
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="DotNetCore.CAP.MySql.Provider" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetCore.CAP.MySql.Provider --version 0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DotNetCore.CAP.MySql.Provider, 0.0.1"
#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 DotNetCore.CAP.MySql.Provider as a Cake Addin #addin nuget:?package=DotNetCore.CAP.MySql.Provider&version=0.0.1 // Install DotNetCore.CAP.MySql.Provider as a Cake Tool #tool nuget:?package=DotNetCore.CAP.MySql.Provider&version=0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DotNetCore.CAP.Provider
DotNetCore.CAP 为其增加FreeSql中的统一事务提交
Getting Started
NuGet
你可以运行以下下命令在你的项目中安装 CAP。
PM> Install-Package DotNetCore.CAP.MySql.Provider
安装FreeSql
PM> Install-Package FreeSql
PM> Install-Package FreeSql.Provider.MySqlConnector
Configuration
首先配置CAP到 Startup.cs 文件中,如下:
public IFreeSql Fsql { get; }
public IConfiguration Configuration { get; }
private string connectionString = @"Data Source=localhost;Port=3306;User ID=root;Password=123456;Initial Catalog=captest;Charset=utf8mb4;SslMode=none;Max pool size=10";
public Startup(IConfiguration configuration)
{
Configuration = configuration;
Fsql = new FreeSqlBuilder()
.UseConnectionString(DataType.MySql, connectionString)
.UseAutoSyncStructure(true)
.Build();
}
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<IFreeSql>(Fsql);
services.AddCap(x =>
{
x.UseMySql(connectionString);
x.UseRabbitMQ("localhost");
x.UseDashboard();
x.FailedRetryCount = 5;
x.FailedThresholdCallback = (type, msg) =>
{
Console.WriteLine(
$@"A message of type {type} failed after executing {x.FailedRetryCount} several times, requiring manual troubleshooting. Message name: {msg.GetName()}");
};
});
services.AddControllers();
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- Dapper (>= 2.0.30)
- DotNetCore.CAP (>= 3.0.0)
- FreeSql.DbContext (>= 1.0.1)
- Microsoft.EntityFrameworkCore (>= 3.1.0)
- Microsoft.EntityFrameworkCore.Relational (>= 3.1.0)
- MySqlConnector (>= 0.61.0)
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 |
---|---|---|
0.0.1 | 650 | 1/8/2020 |
DotNetCore.CAP.Provider 为CAP增加FreeSql中的统一事务提交