Program.cs
- Program.cs file is the entry point of application via Main() method.
- it also register Startup.cs class
- It also register IISIntegration and create a host using an instance of IWebHostBuilder
Startup File
- Configure Service method: it configures services which are required by the app by using Configuration AppServices.it gets called by host before the "Configure" method the configuration app services
- Configure Method: It defines the apps request handling pipeline as a series of middleware components by using configure method.
Depency Injection
- AddSingleton: Create only one instance when the service is requested for first time. And then the same. instance will be shared by all different http request.
- AddScoped: Create single instance for each request. For a different http request there will be a different instance.
- AddTransient: This instance is not shared at all.Every time a new instance will be created.
What is mean KESTRAL ? and What is in process and out of process?
- In Process
Pure IIS Hosting - Process name is w3wp.exe(Only work on IIS)
- Out of Process
Process name is dotnet.exe - Two web server ( IIS/Nginx/Apache+Kestrel) - One web server(Kestrel)
What is Difference Between Kestrel and IIS
Request Delegate
- Use: This method will execute next middleware method.
- Run: Terminates chain. No other middleware method will run after this.Should be placed at the end at the end of pipeline.
- Map: Execute middleware if path requested by user equal path provided in parameter
Save Configuration Technic
- appsettings.json(Default)
- azure key vault
- environment variables
- in memory .NET objects
- command line arguments
- custom providers
What are the various json files avaible in Asp.net Core?
- global.json: You can define about level settings parameter of your solution. For example you solution name or version etc.
- launchsettings.json: You can define environment setting into this file
- appsettings.json: Application settings is defined. For example Dbconnection string, Email configuration etc.
- bundleconfig.json: You can define the configuration for bundling and minification for the projcet
- project.json: Asp.net core users Project.JSON file for storing all project level configuration settings.
What is Custom Middleware and How can add in Asp.net Core ?
- Cookies: Data store in user's the browser. Browsers send cookies with every request.
- Session: Session state helps in transferring data between different pages.
- TempData: In Asp.net MVC is used to transfer data from controlled to view.
- Query String: It is used to transfer limited data by appending the url of request.
Explain inheritance is and , and why it's important
Inheritance is one of most important concepts in object-oriented programming, together with encapsulation and polymorphism. Inheritance provide to create new class from that defined fields in other class. This enable reuseable code and speed up development.
What is LINQ?
LINQ provide us. a consistent query experience to query objects.
What is Garbage Collector
The garbage collector manages allocation and release of memory for an application.
What is difference HEAP and STACK
Heap: Heap is stored reference typesStack: Stack is stored value types



Yorumlar
Yorum Gönder