Upgrade to .NET 6 and update all dependencies

This commit is contained in:
Neil Brommer 2022-04-28 08:57:58 -07:00
parent 2356fbab4f
commit 28747dfe5b
17 changed files with 698 additions and 58 deletions

4
.gitignore vendored
View file

@ -1,5 +1,7 @@
# Project specific # Project specific
Start/Server/app.db Start/Server/app.db
Start/Server/app.db-shm
Start/Server/app.db-wal
# Compiled CSS files # Compiled CSS files
Start/Client/wwwRoot/css/ Start/Client/wwwRoot/css/

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> <Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest> <ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors> <WarningsAsErrors>Nullable</WarningsAsErrors>
@ -45,17 +45,17 @@
</Target> </Target>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.11" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.11" PrivateAssets="all" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.4" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="5.0.11" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="6.0.4" />
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" /> <PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" /> <PackageReference Include="System.Net.Http.Json" Version="6.0.0" />
<PackageReference Include="Blazored.LocalStorage" Version="4.1.5" /> <PackageReference Include="Blazored.LocalStorage" Version="4.2.0" />
<PackageReference Include="Refit" Version="6.1.15" /> <PackageReference Include="Refit" Version="6.3.2" />
<PackageReference Include="Refit.HttpClientFactory" Version="6.1.15" /> <PackageReference Include="Refit.HttpClientFactory" Version="6.3.2" />
<PackageReference Include="Fluxor" Version="4.2.1" /> <PackageReference Include="Fluxor" Version="5.2.0" />
<PackageReference Include="Fluxor.Blazor.Web" Version="4.2.1" /> <PackageReference Include="Fluxor.Blazor.Web" Version="5.2.0" />
<PackageReference Include="Fluxor.Blazor.Web.ReduxDevTools" Version="4.2.1" /> <PackageReference Include="Fluxor.Blazor.Web.ReduxDevTools" Version="5.2.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -1,4 +1,4 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -7,8 +7,6 @@
<title>Start</title> <title>Start</title>
<base href="/" /> <base href="/" />
<script src="_content/Fluxor.Blazor.Web/scripts/index.js"></script>
<link href="css/spectre/spectre.css" rel="stylesheet" /> <link href="css/spectre/spectre.css" rel="stylesheet" />
<link href="css/spectre/spectre-exp.css" rel="stylesheet" /> <link href="css/spectre/spectre-exp.css" rel="stylesheet" />
<link href="css/spectre/spectre-icons.css" rel="stylesheet" /> <link href="css/spectre/spectre-icons.css" rel="stylesheet" />
@ -30,7 +28,7 @@
<div id="blazor-error-ui"> <div id="blazor-error-ui">
An unhandled error has occurred. An unhandled error has occurred.
<a href="" class="reload">Reload</a> <a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a> <a class="dismiss">&times;</a>
</div> </div>
<script src="_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js"></script> <script src="_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js"></script>
<script src="_framework/blazor.webassembly.js"></script> <script src="_framework/blazor.webassembly.js"></script>

View file

@ -64,7 +64,7 @@ namespace Start.Server.Controllers {
return Created( return Created(
Url.Action(nameof(this.GetBookmarkContainer), Url.Action(nameof(this.GetBookmarkContainer),
new { bookmarkContainerId = container.BookmarkContainerId }), new { bookmarkContainerId = container.BookmarkContainerId })!,
container); container);
} }

View file

@ -46,7 +46,7 @@ namespace Start.Server.Controllers {
return Created( return Created(
Url.Action(nameof(GetBookmarkGroup), Url.Action(nameof(GetBookmarkGroup),
new { bookmarkGroupId = newGroup.BookmarkGroupId }), new { bookmarkGroupId = newGroup.BookmarkGroupId })!,
newGroup.MapToDto()); newGroup.MapToDto());
} }

View file

@ -47,7 +47,7 @@ namespace Start.Server.Controllers {
return BadRequest(); return BadRequest();
return Created( return Created(
Url.Action(nameof(this.GetBookmark),new { bookmarkId = bookmark.BookmarkId }), Url.Action(nameof(this.GetBookmark),new { bookmarkId = bookmark.BookmarkId })!,
bookmark); bookmark);
} }

View file

@ -1,5 +1,4 @@
using Start.Server.Models; using Start.Server.Models;
using IdentityServer4.EntityFramework.Options;
using Microsoft.AspNetCore.ApiAuthorization.IdentityServer; using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
@ -7,6 +6,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Duende.IdentityServer.EntityFramework.Options;
namespace Start.Server.Data { namespace Start.Server.Data {
public class ApplicationDbContext : ApiAuthorizationDbContext<ApplicationUser> { public class ApplicationDbContext : ApiAuthorizationDbContext<ApplicationUser> {

View file

@ -0,0 +1,547 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Start.Server.Data;
#nullable disable
namespace Start.Server.Data.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20220428155121_dotnet6_upgrade")]
partial class dotnet6_upgrade
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.4");
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b =>
{
b.Property<string>("UserCode")
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<string>("ClientId")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<DateTime>("CreationTime")
.HasColumnType("TEXT");
b.Property<string>("Data")
.IsRequired()
.HasMaxLength(50000)
.HasColumnType("TEXT");
b.Property<string>("Description")
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<string>("DeviceCode")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<DateTime?>("Expiration")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("SessionId")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("SubjectId")
.HasMaxLength(200)
.HasColumnType("TEXT");
b.HasKey("UserCode");
b.HasIndex("DeviceCode")
.IsUnique();
b.HasIndex("Expiration");
b.ToTable("DeviceCodes", (string)null);
});
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("Algorithm")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("Created")
.HasColumnType("TEXT");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("TEXT");
b.Property<bool>("DataProtected")
.HasColumnType("INTEGER");
b.Property<bool>("IsX509Certificate")
.HasColumnType("INTEGER");
b.Property<string>("Use")
.HasColumnType("TEXT");
b.Property<int>("Version")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("Use");
b.ToTable("Keys");
});
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b =>
{
b.Property<string>("Key")
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<string>("ClientId")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<DateTime?>("ConsumedTime")
.HasColumnType("TEXT");
b.Property<DateTime>("CreationTime")
.HasColumnType("TEXT");
b.Property<string>("Data")
.IsRequired()
.HasMaxLength(50000)
.HasColumnType("TEXT");
b.Property<string>("Description")
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<DateTime?>("Expiration")
.HasColumnType("TEXT");
b.Property<string>("SessionId")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<string>("SubjectId")
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("Key");
b.HasIndex("ConsumedTime");
b.HasIndex("Expiration");
b.HasIndex("SubjectId", "ClientId", "Type");
b.HasIndex("SubjectId", "SessionId", "Type");
b.ToTable("PersistedGrants", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("NormalizedName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasDatabaseName("RoleNameIndex");
b.ToTable("AspNetRoles", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("ClaimType")
.HasColumnType("TEXT");
b.Property<string>("ClaimValue")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("ProviderKey")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("ProviderDisplayName")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<string>("RoleId")
.HasColumnType("TEXT");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<string>("LoginProvider")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property<string>("Value")
.HasColumnType("TEXT");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens", (string)null);
});
modelBuilder.Entity("Start.Server.Models.ApplicationUser", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<int>("AccessFailedCount")
.HasColumnType("INTEGER");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("TEXT");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<bool>("EmailConfirmed")
.HasColumnType("INTEGER");
b.Property<bool>("LockoutEnabled")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("TEXT");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<string>("PasswordHash")
.HasColumnType("TEXT");
b.Property<string>("PhoneNumber")
.HasColumnType("TEXT");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("INTEGER");
b.Property<string>("SecurityStamp")
.HasColumnType("TEXT");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("INTEGER");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("Start.Server.Models.Bookmark", b =>
{
b.Property<int>("BookmarkId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("BookmarkGroupId")
.HasColumnType("INTEGER");
b.Property<string>("Notes")
.HasMaxLength(5000)
.HasColumnType("TEXT");
b.Property<int>("SortOrder")
.HasColumnType("INTEGER");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(300)
.HasColumnType("TEXT");
b.Property<string>("Url")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.HasKey("BookmarkId");
b.HasIndex("BookmarkGroupId");
b.ToTable("Bookmarks");
});
modelBuilder.Entity("Start.Server.Models.BookmarkContainer", b =>
{
b.Property<int>("BookmarkContainerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("ApplicationUserId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("SortOrder")
.HasColumnType("INTEGER");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(300)
.HasColumnType("TEXT");
b.HasKey("BookmarkContainerId");
b.HasIndex("ApplicationUserId");
b.ToTable("BookmarkContainers");
});
modelBuilder.Entity("Start.Server.Models.BookmarkGroup", b =>
{
b.Property<int>("BookmarkGroupId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("BookmarkContainerId")
.HasColumnType("INTEGER");
b.Property<string>("Color")
.IsRequired()
.HasMaxLength(6)
.HasColumnType("TEXT");
b.Property<int>("SortOrder")
.HasColumnType("INTEGER");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(300)
.HasColumnType("TEXT");
b.HasKey("BookmarkGroupId");
b.HasIndex("BookmarkContainerId");
b.ToTable("BookmarkGroups");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.HasOne("Start.Server.Models.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.HasOne("Start.Server.Models.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Start.Server.Models.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.HasOne("Start.Server.Models.ApplicationUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Start.Server.Models.Bookmark", b =>
{
b.HasOne("Start.Server.Models.BookmarkGroup", "BookmarkGroup")
.WithMany("Bookmarks")
.HasForeignKey("BookmarkGroupId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("BookmarkGroup");
});
modelBuilder.Entity("Start.Server.Models.BookmarkContainer", b =>
{
b.HasOne("Start.Server.Models.ApplicationUser", "ApplicationUser")
.WithMany("BookmarkContainers")
.HasForeignKey("ApplicationUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApplicationUser");
});
modelBuilder.Entity("Start.Server.Models.BookmarkGroup", b =>
{
b.HasOne("Start.Server.Models.BookmarkContainer", "BookmarkContainer")
.WithMany("BookmarkGroups")
.HasForeignKey("BookmarkContainerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("BookmarkContainer");
});
modelBuilder.Entity("Start.Server.Models.ApplicationUser", b =>
{
b.Navigation("BookmarkContainers");
});
modelBuilder.Entity("Start.Server.Models.BookmarkContainer", b =>
{
b.Navigation("BookmarkGroups");
});
modelBuilder.Entity("Start.Server.Models.BookmarkGroup", b =>
{
b.Navigation("Bookmarks");
});
#pragma warning restore 612, 618
}
}
}

View file

@ -0,0 +1,51 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Start.Server.Data.Migrations
{
public partial class dotnet6_upgrade : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Keys",
columns: table => new
{
Id = table.Column<string>(type: "TEXT", nullable: false),
Version = table.Column<int>(type: "INTEGER", nullable: false),
Created = table.Column<DateTime>(type: "TEXT", nullable: false),
Use = table.Column<string>(type: "TEXT", nullable: true),
Algorithm = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
IsX509Certificate = table.Column<bool>(type: "INTEGER", nullable: false),
DataProtected = table.Column<bool>(type: "INTEGER", nullable: false),
Data = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Keys", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_PersistedGrants_ConsumedTime",
table: "PersistedGrants",
column: "ConsumedTime");
migrationBuilder.CreateIndex(
name: "IX_Keys_Use",
table: "Keys",
column: "Use");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Keys");
migrationBuilder.DropIndex(
name: "IX_PersistedGrants_ConsumedTime",
table: "PersistedGrants");
}
}
}

View file

@ -5,6 +5,8 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Start.Server.Data; using Start.Server.Data;
#nullable disable
namespace Start.Server.Data.Migrations namespace Start.Server.Data.Migrations
{ {
[DbContext(typeof(ApplicationDbContext))] [DbContext(typeof(ApplicationDbContext))]
@ -13,10 +15,9 @@ namespace Start.Server.Data.Migrations
protected override void BuildModel(ModelBuilder modelBuilder) protected override void BuildModel(ModelBuilder modelBuilder)
{ {
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder.HasAnnotation("ProductVersion", "6.0.4");
.HasAnnotation("ProductVersion", "5.0.11");
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b =>
{ {
b.Property<string>("UserCode") b.Property<string>("UserCode")
.HasMaxLength(200) .HasMaxLength(200)
@ -63,10 +64,46 @@ namespace Start.Server.Data.Migrations
b.HasIndex("Expiration"); b.HasIndex("Expiration");
b.ToTable("DeviceCodes"); b.ToTable("DeviceCodes", (string)null);
}); });
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("Algorithm")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("Created")
.HasColumnType("TEXT");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("TEXT");
b.Property<bool>("DataProtected")
.HasColumnType("INTEGER");
b.Property<bool>("IsX509Certificate")
.HasColumnType("INTEGER");
b.Property<string>("Use")
.HasColumnType("TEXT");
b.Property<int>("Version")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("Use");
b.ToTable("Keys");
});
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b =>
{ {
b.Property<string>("Key") b.Property<string>("Key")
.HasMaxLength(200) .HasMaxLength(200)
@ -110,13 +147,15 @@ namespace Start.Server.Data.Migrations
b.HasKey("Key"); b.HasKey("Key");
b.HasIndex("ConsumedTime");
b.HasIndex("Expiration"); b.HasIndex("Expiration");
b.HasIndex("SubjectId", "ClientId", "Type"); b.HasIndex("SubjectId", "ClientId", "Type");
b.HasIndex("SubjectId", "SessionId", "Type"); b.HasIndex("SubjectId", "SessionId", "Type");
b.ToTable("PersistedGrants"); b.ToTable("PersistedGrants", (string)null);
}); });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
@ -142,7 +181,7 @@ namespace Start.Server.Data.Migrations
.IsUnique() .IsUnique()
.HasDatabaseName("RoleNameIndex"); .HasDatabaseName("RoleNameIndex");
b.ToTable("AspNetRoles"); b.ToTable("AspNetRoles", (string)null);
}); });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
@ -165,7 +204,7 @@ namespace Start.Server.Data.Migrations
b.HasIndex("RoleId"); b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims"); b.ToTable("AspNetRoleClaims", (string)null);
}); });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
@ -188,7 +227,7 @@ namespace Start.Server.Data.Migrations
b.HasIndex("UserId"); b.HasIndex("UserId");
b.ToTable("AspNetUserClaims"); b.ToTable("AspNetUserClaims", (string)null);
}); });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
@ -212,7 +251,7 @@ namespace Start.Server.Data.Migrations
b.HasIndex("UserId"); b.HasIndex("UserId");
b.ToTable("AspNetUserLogins"); b.ToTable("AspNetUserLogins", (string)null);
}); });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
@ -227,7 +266,7 @@ namespace Start.Server.Data.Migrations
b.HasIndex("RoleId"); b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles"); b.ToTable("AspNetUserRoles", (string)null);
}); });
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
@ -248,7 +287,7 @@ namespace Start.Server.Data.Migrations
b.HasKey("UserId", "LoginProvider", "Name"); b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens"); b.ToTable("AspNetUserTokens", (string)null);
}); });
modelBuilder.Entity("Start.Server.Models.ApplicationUser", b => modelBuilder.Entity("Start.Server.Models.ApplicationUser", b =>
@ -312,7 +351,7 @@ namespace Start.Server.Data.Migrations
.IsUnique() .IsUnique()
.HasDatabaseName("UserNameIndex"); .HasDatabaseName("UserNameIndex");
b.ToTable("AspNetUsers"); b.ToTable("AspNetUsers", (string)null);
}); });
modelBuilder.Entity("Start.Server.Models.Bookmark", b => modelBuilder.Entity("Start.Server.Models.Bookmark", b =>

View file

@ -20,7 +20,7 @@ namespace Start.Server.Data.Services {
.Where(bc => bc.BookmarkContainerId == bookmarkContainerId) .Where(bc => bc.BookmarkContainerId == bookmarkContainerId)
.If(includeGroups, q => q.Include(bc => bc.BookmarkGroups)) .If(includeGroups, q => q.Include(bc => bc.BookmarkGroups))
.If(includeBookmarks, q => q .If(includeBookmarks, q => q
.Include(bc => bc.BookmarkGroups) .Include(bc => bc.BookmarkGroups!)
.ThenInclude(bg => bg.Bookmarks)) .ThenInclude(bg => bg.Bookmarks))
.SingleOrDefaultAsync(); .SingleOrDefaultAsync();
@ -40,7 +40,7 @@ namespace Start.Server.Data.Services {
.Where(bc => bc.ApplicationUserId == userId) .Where(bc => bc.ApplicationUserId == userId)
.If(includeGroups, q => q.Include(bc => bc.BookmarkGroups)) .If(includeGroups, q => q.Include(bc => bc.BookmarkGroups))
.If(includeBookmarks, q => q .If(includeBookmarks, q => q
.Include(bc => bc.BookmarkGroups) .Include(bc => bc.BookmarkGroups!)
.ThenInclude(bg => bg.Bookmarks)) .ThenInclude(bg => bg.Bookmarks))
.ToListAsync(); .ToListAsync();
} }

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<UserSecretsId>Start.Server-1D799CBA-C3C7-4198-970E-227998F2DFE2</UserSecretsId> <UserSecretsId>Start.Server-1D799CBA-C3C7-4198-970E-227998F2DFE2</UserSecretsId>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors> <WarningsAsErrors>Nullable</WarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="5.0.11" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.4" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Client\Start.Client.csproj" /> <ProjectReference Include="..\Client\Start.Client.csproj" />
@ -19,15 +19,14 @@
<None Remove="Extensions\" /> <None Remove="Extensions\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Update="app.db" CopyToOutputDirectory="PreserveNewest" ExcludeFromSingleFile="true" /> <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.4" />
</ItemGroup> <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.4" />
<ItemGroup> <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.11" /> <PackageReference Include="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" Version="6.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.11" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.11" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.4"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" Version="5.0.11" /> <PrivateAssets>all</PrivateAssets>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.11" /> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.11" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Data\Services\" /> <Folder Include="Data\Services\" />

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors> <WarningsAsErrors>Nullable</WarningsAsErrors>
</PropertyGroup> </PropertyGroup>

View file

@ -10,7 +10,7 @@ namespace Start_Tests.Client.Store {
[TestMethod] [TestMethod]
public void OnFetchContainersList() { public void OnFetchContainersList() {
base.Store.Dispatch(new FetchContainerListAction()); base.Dispatcher.Dispatch(new FetchContainerListAction());
Assert.IsTrue(base.State.Value.ContainerListState.IsLoadingContainersList); Assert.IsTrue(base.State.Value.ContainerListState.IsLoadingContainersList);
Assert.AreEqual(0, this.State.Value.ContainerListState.Containers.Count); Assert.AreEqual(0, this.State.Value.ContainerListState.Containers.Count);

View file

@ -10,6 +10,7 @@ namespace Start_Tests.Client.Store {
public abstract class UnitTestWithFluxor { public abstract class UnitTestWithFluxor {
protected IServiceProvider ServiceProvider { get; set; } protected IServiceProvider ServiceProvider { get; set; }
protected IStore Store { get; set; } protected IStore Store { get; set; }
protected IDispatcher Dispatcher { get; set; }
protected IState<RootState> State { get; set; } protected IState<RootState> State { get; set; }
// Add child states in the individual tests // Add child states in the individual tests
@ -30,6 +31,7 @@ namespace Start_Tests.Client.Store {
.AddScoped<IBookmarkContainersApi>(sp => new MockBookmarkContainersApi()); .AddScoped<IBookmarkContainersApi>(sp => new MockBookmarkContainersApi());
this.Store = this.BunitTc.Services.GetRequiredService<IStore>(); this.Store = this.BunitTc.Services.GetRequiredService<IStore>();
this.Dispatcher = this.BunitTc.Services.GetRequiredService<IDispatcher>();
this.State = this.BunitTc.Services.GetRequiredService<IState<RootState>>(); this.State = this.BunitTc.Services.GetRequiredService<IState<RootState>>();
this.Store.InitializeAsync().Wait(); this.Store.InitializeAsync().Wait();
} }

View file

@ -1,5 +1,5 @@
using System; using System;
using IdentityServer4.EntityFramework.Options; using Duende.IdentityServer.EntityFramework.Options;
using Microsoft.Data.Sqlite; using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;

View file

@ -1,18 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" /> <PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" /> <PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="coverlet.collector" Version="3.0.2" /> <PackageReference Include="coverlet.collector" Version="3.1.2"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="Fluxor" Version="4.2.1" /> <PrivateAssets>all</PrivateAssets>
<PackageReference Include="Blazored.LocalStorage" Version="4.1.5" /> </PackageReference>
<PackageReference Include="Fluxor" Version="5.2.0" />
<PackageReference Include="Blazored.LocalStorage" Version="4.2.0" />
<PackageReference Include="bunit" Version="1.6.4" /> <PackageReference Include="bunit" Version="1.6.4" />
</ItemGroup> </ItemGroup>