I added two entity tables in my asp.net mvc application between these tables there is FK
table-order and table customer:
the relationship between the tables - CustomerID = id
What I'm trying to do is - when user want to delete customer that belong to some order he will get some alert which says "you can't delete user belong to some order....".
can somebody explain how to do it with Ajax...like to send from view to the controller and check if customerid = id so if true don't delete if false delete.
Please, if you can send some example code I will be very grateful.