35. Deleting data from database (Delete Actor) | ASP.NET MVC

preview_player
Показать описание
------------------------------------------------------------------
The last feature that you will add in the actor's sections is to be able to delete an actor from the database. For that, you will add the "DeleteAsync" method in the ActorsService.
In the ASP.NET MVC project, you are going to also add a new ActionResult in the ActorsController and a new View.
===================================
You can also watch my courses on:
===================================
===================================
00:00 - Welcome
00:20 - Adding new controller action
03:02 - DeleteAsync method in ActorsService
04:26 - Adding Delete view
06:33 - Testing
08:51 - Thank you
===================================
#mvc #aspntemvc #csharp
Рекомендации по теме
Комментарии
Автор

I have done everything as you did, but it is showing error: 'Object reference not set to an instance of an object.' in Index.cshtml...what might be the problem there, i didnt change anything in Index.cshtml

pogodikoje
Автор

may i ask you when we add new Actor there problem that url is localhost/Detials/ 45 it count 45 then when i add new it count correct url: localhost/Details/46 the issue is when i deleted the 5 actor and i add new one it not give me localhost/detials/1 it give 45 or random number how i can the id goes correct 1 2 3 4 5 6 like this

gachaGame
Автор

My delete function is not working after deleting 1 entry, the first time I delete an Actor it gets deleted but after that I try to delete another Actor and nothing happens. If anyone has a solution to this please reply

shoaiblodha
Автор

Sir can you or any one who watch complete vedios that model as in mvc created so there is same way or easy undersatandable method for creating model and using Enity frame work.

raokashifhussain
Автор

Ervis!!! A question...Are we goin to control not to delete an actor that took part of a movie?

ciminoce
Автор

InvalidOperationException: The entity type was not found. Ensure that the entity type has been added to the model.
I get this type of error and i can't solve it .can u help me and thanks

ll
Автор

Sir I followed your videos but I'm getting this URL when clicked the delete button
/Actors/Delete%20/1. How can I fix it? Thank you sir.

pablicojc
join shbcf.ru