CodeLover Technology Pvt. Ltd.

CodeLover Technology Pvt. Ltd. CodeLover Technology provide services in software applications, extensively used in different kind o

1. ASP. NET Core is an open-source and asp.net core training cross-platform that runs on Windows, Linux, and Mac to deve...
17/08/2023

1. ASP. NET Core is an open-source and asp.net core training cross-platform that runs on Windows, Linux, and Mac to develop modern cloud-based applications including IoT apps, Web Apps, Mobile Backends, and more.

I. It is the fastest web development framework from NodeJS, Java Servlet, PHP in raw performance, and Ruby on Rails.
II. ASP.NET core is not an upgraded version of ASP.NET. ASP. NET Core is completely rewriting the work with the .NET framework.
III. It is a much faster, modular, configurable, scalable, cross-platform, and extensible to support of .NET world for which organizations from different parts of the world are grabbing this technology in faster growth.
IV. Even it can work with both .NET Core and .NET frameworks via the .NET standard framework.
V. The ASP.NET Core framework is a completely open-sourced framework. Apart from the other parts of the framework of the .NET framework libraries, the ASP.NET Core is primarily designed from scratch to be the platform-agnostic that performs seamlessly.
VI. It will allow the ASP.NET Core apps to be deployed on the various platforms or the o/s such as the macOS or Linux-based servers or certain devices.
2. Features provided by ASP.NET Core:-
a. Built-in supports for Dependency Injection
b. Built-in supports for the logging framework and it can be extensible
c. Introduced a new, fast and cross-platform web server - Kestrel. So, a web application can run without IIS, Apache, and Nginx
Multiple hosting ways are supported
d. It supports modularity, so the developer needs to include the module required by the application. However, the .NET Core framework is also providing the meta package that includes the libraries
e. Command-line supports to creating, building, and running of the application
f. There is no web.config file. We can store the custom configuration into an appsettings.json file
g. There is no Global.asax file. We can now register and use the services in the startup class
h. It has good support for asynchronous programming
Support WebSocket and SignalR
i. Provide protection against CSRF (Cross-Site Request Forgery)

3. advantages of ASP.NET Core over ASP.NET:-
a. It is cross-platform, so it can be run on Windows, Linux, and Mac.
b.There is no dependency on framework installation because all the required dependencies are shipped with our application
c. ASP.NET Core can handle more requests than the ASP.NET
Multiple deployment options available with ASP.NET Core

4. Metapackages:-
The framework .NET Core 2.0 introduced Metapackage which includes all the supported packages by ASP.NET code with their dependencies into one package. It helps us to do fast development as we don't require to include the individual ASP.NET Core packages. The assembly Microsoft.AspNetCore.All is a meta package provided by ASP.NET core.

Metapackages of .NET Core describes the set of packages that are used together and acts as a parent of the child grouping structure. The Metapackages are referenced just like any other NuGet package naming convention such as "NETStandard.Library". An by referencing the meta-package, you have, then all its child packages will be having the reference of its dependent packages accordingly.

6. Startup class in ASP.NET core:-
The startup class is the entry point of the ASP.NET Core application. Every .NET Core application must have this class. This class contains the application configuration related items. It is not necessary that the class name must be "Startup", it can be anything, we can configure the startup class in the Program class.

7. Use of the ConfigureServices method of the startup class:-
This is an optional method of startup class. It can be used to configure the services that are used by the application. This method calls first when the application is requested for the first time. Using this method, we can add the services to the DI container, so services are available as a dependency in the controller constructor.

8. use of the Configure method of the startup class:-
It defines how the application will respond to each HTTP request. We can configure the request pipeline by configuring the middleware. It accepts IApplicationBuilder as a parameter and also it has two optional parameters: IHostingEnvironment and ILoggerFactory. Using this method, we can configure built-in middleware such as routing, authentication, session, etc. as well as third-party middleware.

9. middleware:-
It is software that is injected into the application pipeline to handle requests and responses. They are just like chained to each other and form as a pipeline. The incoming requests are passed through this pipeline where all middleware is configured, and middleware can perform some action on the request before passing it to the next middleware. Same as for the responses, they are also passing through the middleware but in reverse order.

While working with the ASP.NET Core framework, there are tons of built-in Middleware components available that are already made available that we can use directly that act as a plug and play components. If we don't want to use any of the in-built middleware, then we can also create our own Middleware components in asp.net core applications whenever we want. The most important point that you need to keep in mind is, that in ASP.NET Core a given Middleware component should only have a specific purpose which means it should be used for a single responsibility.

10. difference between IApplicationBuilder.Use() and IApplicationBuilder.Run():-
We can use both the methods in Configure methods of the startup class. Both are used to add middleware delegates to the application request pipeline. The middleware adds using IApplicationBuilder.Use may call the next middleware in the pipeline whereas the middleware adds using IApplicationBuilder.The run method never calls the subsequent middleware. After IApplicationBuilder.Run method, system stop adding middleware in the request pipeline.

11. use of the "Map" extension while adding middleware to the ASP.NET Core pipeline:-
It is used for branching the pipeline. It branches the ASP.NET Core pipeline based on request path matching. If the request path starts with the given path, middleware on to that branch will execute.e.g:-
public void Configure(IApplicationBuilder app)
{
app.Map("/path1", Middleware1);
app.Map("/path2", Middleware2);
}
12. routing in ASP.NET Core:-
Routing is functionality that map incoming request to the route handler. The route can have values (extract them from the URL) that are used to process the request. Using the route, routing can find a route handler based on the URL. All the routes are registered when the application is started. There are two types of routing supported by ASP.NET Core
1. The conventional routing
2. Attribute routing
The Routing uses routes to map incoming requests with the route handler and Generates URL that is used in response. Mostly, the application has a single collection of routes and this collection is used for the process of the request. The RouteAsync method is used to map incoming requests (that match the URL) with available in route collection.

13. Enable Session in ASP.NET Core:-
The middleware for the session is provided by the package Microsoft.AspNetCore.Session. To use the session in the ASP.NET Core application, we need to add this package to the csproj file and add the Session middleware to the ASP.NET Core request pipeline.AddSession();.UseSession();

14. The various JSON files available in ASP.NET Core:-
There are the following JSON files in ASP.NET Core :

1. global.json
2. launchsettings.json
3. appsettings.json
4. bundleconfig.json
5. bower.json
6. package.json

15. Tag helper in ASP.NET Core:-
It is a feature provided by the Razor view engine that enables us to write server-side code to create and render the HTML element in view (Razor). The tag-helper is a C # class that is used to generate the view by adding the HTML element. The functionality of the tag helper is very similar to the HTML helper of ASP.NET MVC.
Example:
//HTML Helper
.TextBoxFor(model => model.FirstName, new { = "form-control", placeholder = "Enter Your First Name" })

//content with tag helper


//Equivalent HTML


16. How to disable Tag Helper at the element level:-
We can disable Tag Helper at the element level using the opt-out character ("!"). This character must apply to open and close the Html tag.


17. How to specify the service life for a registered service that is added as a dependency:-
ASP.NET Core allows us to specify the lifetime for registered services. The service instance gets disposed of automatically based on a specified lifetime. So, we do not care about the cleaning these dependencies, it will take care of the ASP.NET Core framework. There are three types of lifetimes.

18. Singleton: ASP.NET Core will create and share a single instance of the service through the application life. The service can be added as a singleton using the AddSingleton method of IServiceCollection. ASP.NET Core creates a service instance at the time of registration and subsequence requests use this service instance. Here, we do not require to implement the Singleton design pattern and single instance maintained by the ASP.NET Core itself.
e.g :- services.AddSingleton();

19. Transient:- ASP.NET Core will create and share an instance of the service every time to the application when we ask for it. The service can be added as Transient using the AddTransient method of IServiceCollection. This lifetime can be used in stateless service. It is a way to add lightweight service.
e.g:- services.AddTransient();

20. Scoped :-ASP.NET Core will create and share an instance of the service per request to the application. It means that a single instance of service is available per request. It will create a new instance in the new request. The service can be added as scoped using an AddScoped method of IServiceCollection. We need to take care while the service registered via Scoped in middleware and inject the service in the Invoke or InvokeAsync methods. If we inject dependency via the constructor, it behaves like a singleton object.
e.g:-services.AddScoped();

11/08/2023
We are hiring 20 Sales Representative for Cleaning Items Manufacturing Company in Gurugram. Near Huda City Center, Gurug...
11/08/2023

We are hiring 20 Sales Representative for Cleaning Items Manufacturing Company in Gurugram. Near Huda City Center, Gurugram.
Send Updated CV on [email protected] or WhatsApp on +91-6381996475
Salary no barrier for good candidate.

https://youtu.be/Zoz6K9xFcyc
28/03/2023

https://youtu.be/Zoz6K9xFcyc

Operating System Structure, Operating System Services, Program Ex*****on, I/O Operations, File System Manipulation, Communications, Error Detection, System C...

https://youtu.be/mpJ9zbdKWVE
28/03/2023

https://youtu.be/mpJ9zbdKWVE

Linked List Operations, Traversing & Searching a Linked List, Inserting a Node into a Linked List, Inserting a Node at the Beginning of a List, Inserting a N...

Basic .NET Core Interview Questions1. What is .NET Core Framework, and how does it work?NET Core framework provides an o...
16/03/2023

Basic .NET Core Interview Questions
1. What is .NET Core Framework, and how does it work?NET Core framework provides an open-source, accessible, and general-purpose platform to create and run applications onto different operating systems. The framework follows the object-oriented programming principles that we can use C #, .NET, VB, Perl, Cobol, etc., programming languages. The framework provides various built-in tools such as packages, classes, libraries, APIs, and other functionalities. We can create a diverse range of applications.

It works as follows:
Once you have finished developing codes for required applications, you need to compile those application codes to Common Intermediate Language.
The framework uses an assembly file to store the compiled code with an extension (.dll or .exe)
Now, the Common Language Runtime (CLR) of the framework convert the compiled code to machine code (executable code) using the Just In Time (JIT) compiler.
At last, we can execute this executable code on any specific architecture used by developers.

2. What is the latest version of .NET Core? Share one specific attribute.
The latest version of .NET Core is .NET Core 7.0, according to Microsoft Documentation. The newest release includes the .NET Runtime and ASP.NET Core Runtime. It has introduced Android, iOS, and macOS SDKs for developing native applications. You can check this documentation to know the setup instructions and develop .NET MAUI applications.

3. Share specific features of .NET Core?NET Core has these 4 specific features:
Cross-platform: It supports various platforms and is executable on windows, macOS, and Linux. You can easily port the codes from one platform to another platform.
Flexibility: You can easily include codes in the desired app or install them per requirements. It means you can use one single consistent API model for all .NET applications with the help of the same library on various platforms.
Open Source: You can use it by downloading it from the Github library. You don't need to pay to purchase a license. The framework has been licensed under MIT and Apache.
Command-line tools: You can efficiently execute applications at the command line.

4. What is .NET Core used for?
You can use .NET Core in many ways:
For developing and building web applications and services that run on diverse operating systems
For creating Internet of Things applications and mobile backends
For using any development tools on any operating system
For creating and deploying applications to the cloud or other on-premises services.
Flexibility, high performance, and lightweight features allow for the development of applications quickly in containers deployable on all operating systems.

5. Discuss critical components in .NET Core?
Since .NET Core is a modular platform thus, its components could be stacked into these three layers:

A .Net runtime: It consists of different runtime libraries that allow you to perform functions such as type safety, load assemblies, garbage collections etc.
A collection of Framework libraries: It also consists of libraries that offer utilities, primitive data types, etc.
A collection of SDK tools and compilers: It permits you to work with .NET Core SDK quickly.
This stack could be divided into these four components:

Join our team as Digital Marketerwe are looking for talented, creative and self-motivated marketing person to join our t...
06/02/2023

Join our team as Digital Marketer
we are looking for talented, creative and self-motivated marketing person to join our team

Job : HRJob Location : Badarpur, DelhiTwo Candidate Required, Female Preferred , Confirmation will Provided by company a...
01/02/2023

Job : HR
Job Location : Badarpur, Delhi
Two Candidate Required, Female Preferred , Confirmation will Provided by company after 15 days
[email protected]
Send CV on WhatsApp : 6381996475

Address

Delhi
110084

Opening Hours

Monday 10am - 10pm
Tuesday 10am - 10pm
Wednesday 10am - 10pm
Thursday 10am - 10pm
Friday 10am - 10pm
Saturday 2pm - 5pm
Sunday 10am - 10pm

Telephone

+916381996475

Website

Alerts

Be the first to know and let us send you an email when CodeLover Technology Pvt. Ltd. posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share