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'

  )

Friday, 28 March 2025

TodayInterview(EXL health interview)

1.update second table without using subquery.
2.SOLID
3.Abstract vs interface.

UPDATE es

SET es.Salary = es.Salary + 500,  -- Example: Increase salary

    es.Bonus = es.Bonus + 100     -- Example: Increase bonus

FROM EmpSalary es

INNER JOIN Emp e ON es.EmpID = e.EmpID

WHERE e.Department = 'IT';  -- Condition based on Emp table

CTE
WITH CTE_Update AS (
    SELECT es.EmpID, es.Salary, es.Bonus
    FROM EmpSalary es
    INNER JOIN Emp e ON es.EmpID = e.EmpID
    WHERE e.Department = 'IT'  -- Condition based on Emp table
)
UPDATE CTE_Update
SET Salary = Salary + 500,  -- Increase salary
    Bonus = Bonus + 100;    -- Increase bonus


using System;

using System.Linq;


public class HelloWorld

{

    public static void Main(string[] args)

    {

        var names = new string[] { "Alice", "Jonathan", "Christopher", "Bob", "Alexander" };


        var longestName = names

            .Select(name => new { Name = name, Length = name.Length })

            .OrderByDescending(x => x.Length)

            .First();


        Console.WriteLine($"Longest Name: {longestName.Name}");

        Console.WriteLine($"Length: {longestName.Length}");

        

    }

}

Thursday, 20 March 2025

TOP AI web sites

 https://v0.dev/

My Learn

 In this video, let's code, test, and deploy a web app using AI only.

Testsprite: https://www.testsprite.com/?ref=K1D We'll be using TestSprite to test the app after coding to ensure that our front and backend work exactly as we want and that everything is safe and secure. v0: https://v0.dev As for creating the app from the ground up, we'll use v0. Just give simple text prompts and let the AI write code for you. 01:16 Code the app using AI 08:20 Deploy the app 09:00 Test the app https://www.youtube.com/watch?v=l5Amu_tyZEE

Wednesday, 19 March 2025

microservices

 https://github.com/Harsha-Global/Dot-NET-Microservices-with-Azure-and-AKS


Best ui design