Find that action in the controller and make sure the check the parameter and its type which you are passing.Ĭan you provide your code for view and controller, so that I can make the necessary changes and we can try working on it together. You can view a list of files changed in the commit by selecting 8 changed files and when you click on each file it will navigate to the respective file section. gitignore README.md Vidly.sln README.md vidly-mvc-5 A new line of code Contribute to mosh-hamedani/vidly-mvc-5 development by creating an account on GitHub. Sign up for free to join this conversation on GitHub. GitHub - mosh-hamedani/vidly-mvc-5 master 5 branches 0 tags Code 50 commits Failed to load latest commit information. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Click on the solution - section 2 exercise. An unhandled exception was generated during the execution of the current web request. Scroll down the page until you find section 2 exercise. Code With Mosh Review: Are Mosh Hamedani Courses Worth It>Code With Mosh. In package manager console restore the packages. NET MVC 5 - The most popular course with 40,000+ students Bestseller 4. file in visual studio and go to Tools > nuget package manager > package manager console. when you have renamed the solution folder, open the sln. So for this you must make changes in the Action which you are calling in the view. scroll to the bottom of the page and select older. When you have downloaded the zip file of that specific commit, extract it and make sure to rename the folder to vidly-mvc only rather than vidly-mvc. Well say now you have not entered any GenreId other than 1 or 2, for example, you try inserting into the movies table with GenreId=2 and still receive this error? Its because these values (Including Name, GenreId, ReleaseDate etc) are not passed from the view to the controller. The error basically tells us that there is no matching primary key to the supplied foreign key. If you try to add a record in the movies table with a number other than these 1 & 2, you will get the above mentioned error. In 7.net mvc 5 course by Mosh Hamedani (Episode 114)Build Enterprise. So you can only insert values in the movies table with GenreId 1 or 2. Get more libraries',' NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects. Say you have records in the Genre table with Ids 1 & 2. Use saved searches to filter your results more quickly. The GenreId (Movies table) is a foreignkey of the Id (Primary key of Genre table). We read every piece of feedback, and take your input very seriously. The error is due to the fact that there is no related data.įor instance in the movies table and the Genre table. Hey did you find any solution to this? I would like to add my solution to this as it is still OPEN.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |