Тёмный

(#11) Setup MVC in .Net Core application using AddControllersWithViews method | .Net Core Tutorial 

WebGentle
Подписаться 87 тыс.
Просмотров 33 тыс.
50% 1

ASP..Net Core Tutorial: In this video, you will learn how to set up MVC in an empty asp.net core application. When we use the empty template to create a web application using asp.net core framework then MVC is not included by default.
By configuring some methods we can convert an empty template into
- Web API project
- Razor pages
- Model View Controller (MVC)
- etc.
To configure MVC into Asp.Net Core 3.1 empty template we use AddControllersWithViews() method. This AddControllersWithViews() method is used inside ConfigureServices method.
We will also create a home controller and a method inside this controller.
Github repo: github.com/web...
Timestamp:
Agenda of this vide - 00:10
Type of application that can be created using an empty template 00:45
Configure MVC in empty asp.net core template 02:20
Add the first controller in asp.net core application 04:50
Add method inside controller 05:40
Set default route into asp.net core application 06:26
#AddControllersWithViews #AddMVCToEmptyApplication #Nitish
Subscribe WebGentle: goo.gl/PJr1pN
Visit Our Website: bit.ly/2tElGud
Visit WebGentle Community: bit.ly/35uOUsJ
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
For business inquiry contact: nitish.webgentle@gmail.com
Follow us on
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Facebook - bit.ly/36yZuQN
Linkedin - bit.ly/2N6Onqk
Twitter - bit.ly/2uv04AP
Popular free courses from WebGentle
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Jira tutorial - bit.ly/jiratuto...
Azure DevOps tutorial - bit.ly/azuredev...
.NET Core 3.0 fundamentals - bit.ly/dotnetcore3
MVC5 tutorial - bit.ly/mvcbynitish
LINQ Tutorial - bit.ly/linqbyni...
Non generic collection in c# - bit.ly/nongener...

Наука

Опубликовано:

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 19   
@balteebhaii5259
@balteebhaii5259 2 года назад
Sir your teaching level is so good sir Plz make a video about google maps in mvc i am waiting for your tutorials because i understand your concept in easy way plz sir make a video
@sachinrajput4746
@sachinrajput4746 Год назад
Osm tutorials sir
@gor2em
@gor2em 4 года назад
very good.
@jaeen7665
@jaeen7665 4 года назад
Thank you.
@pritishranjan
@pritishranjan 4 года назад
Sir tell us using .NET core with Entity framework core 3.1..CRUD operation and all the configuration needed
@WebGentle
@WebGentle 4 года назад
keep watching. everything you need is coming very soon.
@ProgrammingNoob
@ProgrammingNoob 4 года назад
Please Upload ViewComponent Videos as soon as possible
@developerdailylife4791
@developerdailylife4791 3 года назад
Hi sir , when i am trying to add Home controller with index action method ,such as you explain but i added before endpoints.MapDefaultControllerRoute() this code : app.Use(async (context, next) => { await context.Response.WriteAsync("Hello from my first Middle ware (M1)" + " "); // to go to next middle ware we should call next method here await next(); await context.Response.WriteAsync("Hello from my first Middle ware (M1) response " + " "); }); only this message appear : Hello from my first Middle ware (M1) as output and the message in Index function in Home controller not appear and response message in app.Use() not appear too Can you explain why this happen please ?
@ssmohanty153
@ssmohanty153 4 года назад
this thins not working when i add thta calass the use endpoints.MapDefaultControllerRoute(); one the error comes in window pages. This localhost page can’t be foundNo webpage was found for the web address: localhost:5001/
@wasikquayum
@wasikquayum 4 года назад
I also face this problem. Can you find the solution?
@wasikquayum
@wasikquayum 4 года назад
i face problem to use endpoint.MapDafaultRouting();.its not working
@Karan-sir
@Karan-sir 2 года назад
did you resolved this problem
@hashirsoomro6454
@hashirsoomro6454 2 года назад
use ConfigureServices() instead of ConfigurationServices()
@boyatbox
@boyatbox 3 года назад
Index 'action' method
@WebGentle
@WebGentle 3 года назад
Yes. All the public methods reside in the Controller are known as Action Method.
@nguyentuananh4078
@nguyentuananh4078 3 года назад
You should upload the code before each video for easy learing.
@WebGentle
@WebGentle 3 года назад
The code is already available at github.com/webgentle/aspnet-core-mvc
@nguyentuananh4078
@nguyentuananh4078 3 года назад
@@WebGentle I Mean before each Video you have a code to start looking the video and folllow you. And the code after complete the video, not all the code.
Далее
Getting Started with AutoMapper in ASP.NET Core
9:47
Don't throw exceptions in C#. Do this instead
18:13
Просмотров 256 тыс.
Sending Email in C# using FluentEmail
30:36
Просмотров 89 тыс.
Dotnet full stack development roadmap
14:34
Просмотров 43 тыс.
Middleware in ASP NET Core
8:18
Просмотров 347 тыс.
Google Pixel 9/Pro Review: Gimmick or Good?
24:05
Просмотров 2,4 млн
Самый дорогой телефон 2000х
0:54