We have so far seen
samples of how to display Hello World text in the browser from Asp.Net core,
rendering a static HTML page from Asp.Net core etc. Let us now move on a little
further to setup MVC in the Asp.Net Core application. Follow the below steps to
create a basic MVC project using Asp.Net Core
Ø Open
Visual studio (I am using VS 2017) and select new Project.
Ø Select
Web -> .Net Core
Ø Select
Asp.Net Core web application
Ø Provide
a name (Hello MVC) and path and click OK
Ø In
the templates select Web Application
(Model-View-Controller) and click OK
Ø This
will create a basic MVC project with one Controller and View
We can build and run the application, the MVC template creates us the basic files required to run the example without writing a single line of code. Build and run the Project and the output should be as follows.
No comments:
Post a Comment