Thursday, February 20, 2025

.Net and core

 



SQL:

Get Highest salary of 3 employee without using limit,and top

SELECT StageID, DepartmentNumber, UserEmail
        ,DENSE_RANK() OVER (PARTITION BY DepartmentNumber
         ORDER BY UserEmail ASC) AS DRANK 
   FROM mytable 


Get full name from First name and last name of table

create view

SELECT CONCAT (FirstName, ' , ' , LastName) AS fullname (salary*12)+(experience*500) AS total FROM staff



𝐌𝐚𝐬𝐭𝐞𝐫𝐢𝐧𝐠 .𝐍𝐄𝐓 𝐂𝐨𝐫𝐞: 20  𝐟𝐫𝐨𝐦 𝐄𝐚𝐬𝐲 𝐭𝐨 𝐇𝐚𝐫𝐝

What is .NET Core, and how does it differ from .NET Framework?
What is the role of the Startup.cs file in an ASP.NET Core application?
What are middleware components, and how do they work in the ASP.NET Core request pipeline?
How do you configure dependency injection in .NET Core?
What is the difference between IConfiguration and IOptions in .NET Core?
How does the appsettings.json file work in .NET Core?
What is the significance of the Program.cs file in .NET Core applications?

𝐈𝐧𝐭𝐞𝐫𝐦𝐞𝐝𝐢𝐚𝐭𝐞:
8. What is Kestrel, and why is it used in .NET Core?
9. Explain the concept of routing in ASP.NET Core.
10. What is the purpose of ConfigureServices and Configure methods in the Startup class?
11. How does ASP.NET Core handle cross-origin resource sharing (CORS)?
12. What are the benefits of using Entity Framework Core in .NET Core applications?
13. Explain the role of the IHostedService interface in .NET Core and provide an example of how to implement it.
14. How does ASP.NET Core support asynchronous programming?

𝐀𝐝𝐯𝐚𝐧𝐜𝐞𝐝

15. How does the ASP.NET Core request processing pipeline work internally?
16. How would you design and implement a microservices architecture using ASP.NET Core?
17. What is the difference between IApplicationBuilder and IServiceCollection in .NET Core?
18. How can you implement centralized logging and monitoring in a .NET Core application?
19. Explain the difference between transient, scoped, and singleton lifetimes in dependency injection.
20. How would you implement health checks in an ASP.NET Core application?
21. What is the purpose of the BackgroundService class, and how does it relate to IHostedService?
22. How does the .NET Core Generic Host differ from the Web Host?
23. How would you handle global exception handling in ASP.NET Core?
24. What is the purpose of DataProtection in .NET Core, and how would you use it?
25. How can you configure and manage multiple environments in ASP.NET Core?