Lesson 01. ASP.NET 5.0 MVC (Project Files Arrangement)
Components of .NET
Let's look at files that are created in the ASP.NET Core 5.0 MVC project
Host.CreateDefaultBuilder() - will create a default web host okay so it's going to configure the web host using the default settings therefore it uses a web builder and then it starts.
Key Concepts you must know
Dependency injection is a technique whereby one object or static method supplies the dependencies of another object. A dependency is an object that can be used so it's a service.
领英推荐
class should depend on abstraction and not upon concretions so in simple terms it shouldn't be hard code
Routing mechanism in .Net Core
There are different routing mechanisms in net core. The ways to configure routing in any application.
ASP.NET CORE controllers use he routing middleware to match the URLs of incoming requests and map them with the controller in action so we're going to see what controllers and actions.
Model: The model represents the shape of the data. A class in C# is used to describe a model. Model objects store data retrieved from the database. (The model represents the data)
View: View in MVC is a user interface. View display model data to the user and also enables them to modify them. View in ASP.NET MVC is HTML, CSS, and some special syntax (Razor syntax) that makes it easy to communicate with the model and the controller. (The view is the User Interface)
Controller: The controller handles the user request. Typically, the user uses the view and raises an HTTP request, which will be handled by the controller. The controller processes the request and returns the appropriate view as a response. (The controller is the request handler)