Thursday, 10 April 2025

upgrade the dotnet version

 

βœ… 1. Update SDK and Runtime

You can verify it using:

bash
dotnet --version

βœ… 2. Update Target Framework in .csproj

Open your .csproj file and update the TargetFramework:

xml
<TargetFramework>net8.0</TargetFramework>

If you're using a multi-target project or want to support other platforms, update accordingly.


βœ… 3. Update NuGet Packages

Update all NuGet packages to their compatible .NET 8 versions.

You can do this via the terminal:

bash
dotnet list package --outdated dotnet add package <PackageName> --version <LatestVersion>

Or use Visual Studio NuGet Package Manager to upgrade.


βœ… 4. Review and Update Code for Breaking Changes

Check the official Microsoft breaking changes list: πŸ“˜ ASP.NET Core Breaking Changes in .NET 8

Examples:

  • Minimal APIs may have changes in how they handle results.

  • Changes in JSON serialization with System.Text.Json.

  • Middleware updates, especially if you're using custom authentication/authorization.


βœ… 5. Optional: Upgrade EF Core (if used)

If you're using Entity Framework Core:

Update the EF Core NuGet packages to version 8.x.

Update your DbContext configuration if any new changes are needed. Review EF Core 8 breaking changes: πŸ“˜ EF Core 8 Breaking Changes


βœ… 6. Clean and Rebuild

dotnet clean dotnet build

Then run the app:

dotnet run

Wednesday, 9 April 2025

find the duplicates between two users

  delete  FROM tbl_Users

WHERE User_ID = 'cgius'

  AND Site_Location IN (


SELECT b.Site_Location

    FROM tbl_Users a

    JOIN tbl_Users b

      ON a.Site_Location = b.Site_Location

    WHERE a.User_ID = 'cccook'

      AND b.User_ID = 'cgius'

  )

7 Common mistakes in Dot Netβ€Šβ€”β€ŠYou can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...