(#27) Display Model list data on view in Asp.Net Core | Asp.Net Core tutorial
ฝัง
- เผยแพร่เมื่อ 10 ต.ค. 2024
- 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...
Your flow is amazing and keep the flow the same way. The way you are building the application from scratch and building it up is so amazing. Sometimes you copy the bootstrap code from somewhere, I suggest for future show those links as well but I see you do in many videos but on some it is not there. You can mention in the comment for those videos.
Thanks @Adnan for the kind words and suggestions. Keep watching the videos and share your valuable feedback with me in the comment section.
#KeepLearning
Thanks you Nitish sir for this series. I have religiously been watching every bit your videos in this series so far and you have been so kind to be as precise as possible. Very excited to finish this till last section.
So nice of you
You are doing a great job brother. Thumbs up! This style of creating a app is very good. At start of the playlist where you mixed note pad with visual studio gave a bad impression and i believe that is the reason many people are leaving the play list. But now it is so amazing. I love this. Please keep building such applications in MVC such as LMS. Love you more.
You the best
Thank you very much for all these tutorials.
Awesome, sir for bootstrap kindly add that in the comment section if possible
Sir Nitish Thank you so much for providing us these great lectures , i have one query , you passed ienumerbale type @model, if we simply use @model webgentle.bookstore.Model and then use foreach loop , would it have worked ? or it is necessary to pass model in ienumerable type ?
thank you
Thank you again
Thanks, you are perfect.
hey , I get an error in @foreach(var book in Model) line .nullreferenceexception: object reference not set to an instance of an object. .
Please, help me out?
Yes I had literally the same issue this issue occurs BCz we hadn't pass the data in return view(); that's why showing null just replace it with return view(data); the error will be resolved 😊
Hi sir! can you give the code of SVG tag that you use in this tutorial? I can't find in github and bootstrap! Hope to get your reply as soon as possible.Thanks
you can find it on icons.getbootstrap.com/ For example I used this one:
I'm facing this error
Object reference not set to an instance of an object.
BookShop.Controllers.BookController.Getbooks() in BookController.cs
-
public BookController()
{
BookRepository _bookRepositoty = new BookRepository();
}
public ViewResult Getbooks()
{
var data = _bookRepositoty.getallbooks();
return View(data);
}
}
}
Is there is any videos in this course about publishing process using .net core as i think it's different from .net framework ?
upcoming
@@WebGentle thank you for replay , you did great job in this course
Sir bootstrap 4 "container-fluid" not working on visual studio 2019 and if i increase its width then only increases on right side while the left remains fixed
What if heave multiple grids with different models how will do this
Sir, if I want to use 3 different model in same view for foreach loop, then how it know to @model directive to use which model to use in which foreach loop?
Directly you cant. Use one of the following based on the requirement
- Separate partial view
- Separate view component
- View Model
How to render mote than 1 model in the view?
Hi Sir, when we add book card code in GetAllBook.cshtml is add successfully.
I add IEnumerable @modelIEnumerable
But when use
@foreach (var book in Model) and run this application then I got exception error which is
An unhandled exception occurred while processing the request.
NullReferenceException: Object reference not set to an instance of an object.
AspNetCore.Views_Book_GetAllBook.ExecuteAsync() in GetAllBook.cshtml, line 9
could you please help me ..
Did u fix the error
How did u fix the error ?