Rotate your phone

Your viewport is too small. Rotate your phone or use a Desktop-PC.

Thank you. scobiform.com

Migrating Blazor - ASP.NET Core 5.0 to 6.0

You can find detailes information about the migration process on docs.microsoft.com First, create a new Blazor ServerApp and copy over every file that will be unchanged. You need to edit
  • Program.cs
  • Pages/_Layout.cshtml

Changes to Program.cs

You will see that Startup.cs is now integrated into Program.cs - Simply copy over your Services and put a builder before it
builder.Services.AddRazorPages();

MySQL connection

If you are using MariaDB like I do, you can change your ApplicationDbContext to:
// ##### MariaDB
// Replace with your connection string.
var connectionString = builder.Configuration.GetConnectionString("MariaDB");

// Replace with your server version and type.
// Use 'MariaDbServerVersion' for MariaDB.
// Alternatively, use 'ServerVersion.AutoDetect(connectionString)'.
// For common usages, see pull request #1233.
var serverVersion = new MariaDbServerVersion(new Version(10, 3, 29));

// Replace 'YourDbContext' with the name of your own DbContext derived class.
builder.Services.AddDbContext(
    dbContextOptions => dbContextOptions
        .UseMySql(connectionString, serverVersion)
        .EnableSensitiveDataLogging() // <-- These two calls are optional but help
        .EnableDetailedErrors()       // <-- with debugging (remove for production).
);

November 09, 2021 by scobiform

An error has occurred. This application may no longer respond until reloaded. Reload 🗙