Hello, please help me. There was such an error : An unhandled exception occurred while processing the request. NullReferenceException: Object reference not set to an instance of an object. Webgentle.BookStore.Controllers.BookController.AddNewBook(bool isSuccess, int bookId) in BookController.cs, line 46 NullReferenceException: Object reference not set to an instance of an object. Webgentle.BookStore.Controllers.BookController.AddNewBook(bool isSuccess, int bookId) in BookController.cs + ViewBag.Language = new SelectList(await _languageRepository.GetLanguages(), "Id","Name"); lambda_method(Closure , object )
Hello! So in the previous video, you removed multi-select to use enums and you've carried on using single-select. In the video that you covered multi-select, you didn't cover how to send that new data to the database- the database was still receiving the singular string value. Would you be happy to cover that?
Hi Nitish, your videos are very helpful and informative. can you please upload video on Bind DropDownList and DropDownList based on another DropDownList selected value in ASP.NET CORE 3.1
i Have followed every step and getting below error plz reproduce and guide why i am getting this NullReferenceException: Object reference not set to an instance of an object. Microsoft.AspNetCore.Mvc.Rendering.MultiSelectList.GetListItemsWithValueField()
Is it fine to Change Model Randomly also instead of using multiple model for different Operation Can we use ViewModel. Its very informative but implementation is bit Complicated.
Great job for the good work. After watching and implement this lesson i continue to get this error when adding new book SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Books_Language_LanguageId". The conflict occurred in database "BookStore", table "dbo.Language", column 'LanguageId'. The statement has been terminated.
Hey, I was getting a similar error when I was trying to add a migration for the table. I fixed this by removing any existing data in the tables then adding a new migration and updating the database.
HI Nitish sir you video very information and useful but sir I have one question edit mode cascading dropdownlist in asp.net core mvc exam dropdown1 value 1 and dropdown2 how can be set from database
Hi Nitish, your videos are very helpful and informative. can you please upload video on Azure SSO ( single sign on). and how to configure SSO from visual studio?
Instead of using viewbag you can pass the data in model property and use your model property on view in asp-items attribute. Rest everything will be same.
System.NullReferenceException: 'Object reference not set to an instance of an object.' Bookstore.Data.Book.language.get returned null when getaallbooks in getallbook methos I had too add this line to fix it book.language =await _db.langtable.Where(x => x.id == book.languageId).FirstOrDefaultAsync();
Super, Just finished all the videos and you are amazing!..Simple, detailed, short explanation. Thanks alot.
Egarly waiting for next videos!
Thank you very much sir, this video really helpful for me .
ThankYou Sir For this Playlist It help me alot for my study and project
Hello, please help me. There was such an error :
An unhandled exception occurred while processing the request.
NullReferenceException: Object reference not set to an instance of an object.
Webgentle.BookStore.Controllers.BookController.AddNewBook(bool isSuccess, int bookId) in BookController.cs, line 46
NullReferenceException: Object reference not set to an instance of an object.
Webgentle.BookStore.Controllers.BookController.AddNewBook(bool isSuccess, int bookId) in BookController.cs
+
ViewBag.Language = new SelectList(await _languageRepository.GetLanguages(), "Id","Name");
lambda_method(Closure , object )
This video very helpful sir ji 🙏🙏🙏
Hello! So in the previous video, you removed multi-select to use enums and you've carried on using single-select. In the video that you covered multi-select, you didn't cover how to send that new data to the database- the database was still receiving the singular string value. Would you be happy to cover that?
Hi Nitish, your videos are very helpful and informative. can you please upload video on Bind DropDownList and DropDownList based on another DropDownList selected value in ASP.NET CORE 3.1
i Have followed every step and getting below error plz reproduce and guide why i am getting this
NullReferenceException: Object reference not set to an instance of an object.
Microsoft.AspNetCore.Mvc.Rendering.MultiSelectList.GetListItemsWithValueField()
Is it fine to Change Model Randomly also instead of using multiple model for different Operation Can we use ViewModel. Its very informative but implementation is bit Complicated.
Great job for the good work. After watching and implement this lesson i continue to get this error when adding new book
SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Books_Language_LanguageId". The conflict occurred in database "BookStore", table "dbo.Language", column 'LanguageId'. The statement has been terminated.
Hey, I was getting a similar error when I was trying to add a migration for the table. I fixed this by removing any existing data in the tables then adding a new migration and updating the database.
It shows BookStore.models.BookLanguage in all the drop drown items instead of languages . why ?
Problem solved . I forget to pass second and third parameter in SelectList()
Why 14:57 Id = 0 without error while my code returns view
i have same error
HI Nitish sir you video very information and useful but sir I have one question
edit mode cascading dropdownlist in asp.net core mvc
exam dropdown1 value 1 and dropdown2 how can be set from database
really good
Hi Nitish, your videos are very helpful and informative. can you please upload video on Azure SSO ( single sign on). and how to configure SSO from visual studio?
Will try
Please cover Dropdown using ViewModel instead of using ViewData or ViewBag also.
Instead of using viewbag you can pass the data in model property and use your model property on view in asp-items attribute. Rest everything will be same.
Master Nitish are you going to add globalization to this app? that would be awesome.
Good idea. Definitely will try
repository concept is a such hard thing to learn
System.NullReferenceException: 'Object reference not set to an instance of an object.'
Bookstore.Data.Book.language.get returned null when getaallbooks
in getallbook methos I had too add this line to fix it
book.language =await _db.langtable.Where(x => x.id == book.languageId).FirstOrDefaultAsync();
I am getting same error in Droplist binding don't know what is the issue
This method is too tough kindly use it as to make it easy ,
useless, Greate concepts but 0 following potential