Skip to content

Commit bfcc8b8

Browse files
yang-xiaodongyangxiaodong
authored andcommitted
Upgrade dependent NuGet packages.
1 parent 3443544 commit bfcc8b8

28 files changed

Lines changed: 33 additions & 73 deletions

File tree

build/BuildScript.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="FlubuCore" Version="9.0.0" />
20+
<PackageReference Include="FlubuCore" Version="10.1.0" />
2121
</ItemGroup>
2222

2323
</Project>

samples/Sample.AzureServiceBus.InMemory/Sample.AzureServiceBus.InMemory.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
7-
<UserSecretsId>1c4ab524-d04d-459c-bf1d-9cb5da3ecaf1</UserSecretsId>
87
</PropertyGroup>
98

109
<ItemGroup>

samples/Sample.ConsoleApp/Sample.ConsoleApp.csproj

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

88
<ItemGroup>
99
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.0" />
10-
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="8.2.1" />
10+
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="10.0.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

samples/Sample.Dashboard.Auth/Sample.Dashboard.Auth.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.0" />
15-
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="8.2.1" />
15+
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="10.0.0" />
1616
</ItemGroup>
1717
</Project>

samples/Sample.Kafka.PostgreSql/Sample.Kafka.PostgreSql.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<WarningsAsErrors>NU1701</WarningsAsErrors>
66
<NoWarn>NU1701</NoWarn>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Dapper" Version="2.1.66" />
11-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
10+
<PackageReference Include="Dapper" Version="2.1.72" />
11+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.1" />
1212
</ItemGroup>
1313
<ItemGroup>
1414
<ProjectReference Include="..\..\src\DotNetCore.CAP.Dashboard\DotNetCore.CAP.Dashboard.csproj" />
Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
1-
using Microsoft.EntityFrameworkCore;
2-
3-
namespace Sample.RabbitMQ.MySql
1+
namespace Sample.RabbitMQ.MySql
42
{
5-
public class Person
6-
{
7-
public int Id { get; set; }
8-
9-
public string Name { get; set; }
10-
11-
public int Age { get; set; }
12-
13-
public override string ToString()
14-
{
15-
return $"Name:{Name}, Age:{Age}";
16-
}
17-
}
18-
19-
public class AppDbContext : DbContext
3+
public static class AppDbContext
204
{
215
public const string ConnectionString = "Server=127.0.0.1;Database=cap;Uid=root;Pwd=my-secret-pw;";
22-
public DbSet<Person> Persons { get; set; }
23-
24-
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
25-
{
26-
optionsBuilder.UseMySql(ConnectionString, ServerVersion.AutoDetect(ConnectionString));
27-
}
286
}
297
}

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,6 @@ public async Task<IActionResult> AdonetWithTransaction()
6161
return Ok();
6262
}
6363

64-
[Route("~/ef/transaction")]
65-
public async Task<IActionResult> EntityFrameworkWithTransaction([FromServices] AppDbContext dbContext)
66-
{
67-
using (var trans = await dbContext.Database.BeginTransactionAsync(_capBus, autoCommit: false))
68-
{
69-
await dbContext.Persons.AddAsync(new Person() { Name = "ef.transaction" });
70-
await _capBus.PublishAsync("sample.rabbitmq.mysql", DateTime.Now);
71-
await dbContext.SaveChangesAsync();
72-
await trans.CommitAsync();
73-
}
74-
return Ok();
75-
}
76-
7764
[NonAction]
7865
[CapSubscribe("sample.rabbitmq.mysql")]
7966
public void Subscriber(DateTime time)

samples/Sample.RabbitMQ.MySql/Program.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
var builder = WebApplication.CreateBuilder(args);
66

77
// Add services to the container
8-
builder.Services.AddDbContext<AppDbContext>();
9-
108
builder.Services.AddCap(x =>
119
{
12-
x.UseEntityFramework<AppDbContext>();
10+
x.UseMySql(AppDbContext.ConnectionString);
1311
x.UseRabbitMQ("localhost");
1412
x.UseDashboard();
1513
});

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Dapper" Version="2.1.66" />
9-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.18" />
10-
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="9.0.0" />
8+
<PackageReference Include="Dapper" Version="2.1.72" />
9+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.0" />
1110
</ItemGroup>
1211
<ItemGroup>
1312
<ProjectReference Include="..\..\src\DotNetCore.CAP.Dashboard.K8s\DotNetCore.CAP.Dashboard.K8s.csproj" />

samples/Sample.RabbitMQ.SqlServer/Sample.RabbitMQ.SqlServer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Dapper" Version="2.1.66" />
8+
<PackageReference Include="Dapper" Version="2.1.72" />
99
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.0" />
1010
<PackageReference Include="NameGenerator" Version="2.0.4" />
1111
</ItemGroup>

0 commit comments

Comments
 (0)