Skip to content

Commit 527fbde

Browse files
committed
Updated to .Net 9.0
1 parent e6f0969 commit 527fbde

File tree

4 files changed

+487
-481
lines changed

4 files changed

+487
-481
lines changed

src/Host/Host.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.1" />
9-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.1" />
8+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.10" />
9+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.10" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

src/Host/Startup.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,21 @@ public void ConfigureServices(IServiceCollection services)
1313
{
1414
services.AddDbContext<IdentityDbContext>(opt => opt.UseInMemoryDatabase("test"));
1515

16-
services.AddIdentity<IdentityUser, IdentityRole>()
16+
services.AddIdentity<IdentityUser, IdentityRole>(options =>
17+
{
18+
options.Password.RequireDigit = false;
19+
options.Password.RequireLowercase = false;
20+
options.Password.RequireNonAlphanumeric = false;
21+
options.Password.RequireUppercase = false;
22+
options.Password.RequiredLength = 4;
23+
})
1724
.AddEntityFrameworkStores<IdentityDbContext>()
1825
.AddDefaultTokenProviders();
1926

2027
services.AddIdentityManager()
2128
.AddIdentityMangerService<AspNetCoreIdentityManagerService<IdentityUser, string, IdentityRole, string>>();
22-
}
23-
29+
}
30+
2431
public void Configure(IApplicationBuilder app)
2532
{
2633
app.UseDeveloperExceptionPage();

0 commit comments

Comments
 (0)