00_NET Core
00_NET Core
NET Core
.NET Core
Table of Contents
No. Questions
Dotnet core
5 Explain appsettings.json
11 How to do implement?
https://amitpnk.github.io/interview-questions/#/./DotnetCore 1/6
8/8/24, 7:34 PM .NET Core
No. Questions
14 What is razor?
15 What is Kestrel?
16 Why Kestrel?
18 Session management?
It is an open source cross platform web development framework to develop web application
created by Mircosoft
https://amitpnk.github.io/interview-questions/#/./DotnetCore 2/6
8/8/24, 7:34 PM .NET Core
It is archtecture pattern.
5. Explain appsettings.json
By IConfiguration
DI is practice of providing dependent objects from outside rather then creating inside class
c#
ConfigureServices()
{
services.AddScoped(typeof(IRequestDeal<>), typeof(DealDomain<>));
}
https://amitpnk.github.io/interview-questions/#/./DotnetCore 3/6
8/8/24, 7:34 PM .NET Core
Middleware components are pieces of code, which are added to your application’s pipeline
and have the job of handling each request and response
c#
app.UseMiddleware<CustomMiddleware>();
AddScoped - With scoped service, we get same instance within scope of given http
request but new instancce accross diferent http requests
AddTransient - With transient service, a new instance is provided every time an instance
is requested whether it is scope of same http request or across different http requests
AddSingleton - When service is first requested and that single instance is used by all http
requests throughout application.
https://amitpnk.github.io/interview-questions/#/./DotnetCore 4/6
8/8/24, 7:34 PM .NET Core
Session
ViewData
ViewBag
TempData
PREVIOUS NEXT
https://amitpnk.github.io/interview-questions/#/./DotnetCore 5/6
8/8/24, 7:34 PM .NET Core
https://amitpnk.github.io/interview-questions/#/./DotnetCore 6/6