Skip to content

Commit 5538ccc

Browse files
committed
Downgrade Microsoft.Data.SqlClient to 6.0.2
1 parent 13ee8c0 commit 5538ccc

File tree

6 files changed

+23
-97
lines changed

6 files changed

+23
-97
lines changed

samples/Sample.RabbitMQ.MySql/Controllers/ValuesController.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
using System;
2-
using System.Data;
3-
using System.Threading.Tasks;
1+
using System.Data;
42
using Dapper;
53
using DotNetCore.CAP;
64
using Microsoft.AspNetCore.Mvc;
75
using MySqlConnector;
86

97
namespace Sample.RabbitMQ.MySql.Controllers
108
{
11-
129
[Route("api/[controller]")]
1310
public class ValuesController : Controller
1411
{
@@ -82,7 +79,6 @@ public void Subscriber(DateTime time)
8279
Console.WriteLine("Publishing time:" + time);
8380
}
8481

85-
8682
[NonAction]
8783
[CapSubscribe("sample.rabbitmq.test")]
8884
public void Subscriber2(string message)

samples/Sample.RabbitMQ.MySql/IKeydService.cs

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
using Microsoft.AspNetCore.Hosting;
2-
using Microsoft.Extensions.Hosting;
1+
using Sample.RabbitMQ.MySql;
32

4-
namespace Sample.RabbitMQ.MySql
3+
var builder = WebApplication.CreateBuilder(args);
4+
5+
// Add services to the container
6+
builder.Services.AddDbContext<AppDbContext>();
7+
8+
builder.Services.AddCap(x =>
59
{
6-
public class Program
7-
{
8-
public static void Main(string[] args)
9-
{
10-
CreateHostBuilder(args).Build().Run();
11-
}
10+
x.UseEntityFramework<AppDbContext>();
11+
x.UseRabbitMQ("localhost");
12+
x.UseDashboard();
13+
});
14+
15+
builder.Services.AddControllers();
16+
17+
var app = builder.Build();
18+
19+
// Configure the HTTP request pipeline
20+
app.UseRouting();
21+
app.MapControllers();
1222

13-
public static IHostBuilder CreateHostBuilder(string[] args) =>
14-
Host.CreateDefaultBuilder(args)
15-
.ConfigureWebHostDefaults(webBuilder =>
16-
{
17-
webBuilder.UseStartup<Startup>();
18-
});
19-
}
20-
}
23+
app.Run();

samples/Sample.RabbitMQ.MySql/Sample.RabbitMQ.MySql.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
56
</PropertyGroup>
67

78
<ItemGroup>
89
<PackageReference Include="Dapper" Version="2.1.66" />
9-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
1010
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.3" />
11-
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.3" />
1211
</ItemGroup>
1312
<ItemGroup>
14-
<ProjectReference Include="..\..\src\DotNetCore.CAP.Dashboard.K8s\DotNetCore.CAP.Dashboard.K8s.csproj" />
1513
<ProjectReference Include="..\..\src\DotNetCore.CAP.Dashboard\DotNetCore.CAP.Dashboard.csproj" />
1614
<ProjectReference Include="..\..\src\DotNetCore.CAP.MySql\DotNetCore.CAP.MySql.csproj" />
1715
<ProjectReference Include="..\..\src\DotNetCore.CAP.RabbitMQ\DotNetCore.CAP.RabbitMQ.csproj" />

samples/Sample.RabbitMQ.MySql/Startup.cs

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/DotNetCore.CAP.SqlServer/DotNetCore.CAP.SqlServer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<ItemGroup>
1010
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.18" />
11-
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.0" />
11+
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" />
1212
<ProjectReference Include="..\DotNetCore.CAP\DotNetCore.CAP.csproj" />
1313
</ItemGroup>
1414

0 commit comments

Comments
 (0)