Exceptions in ASP.MVC
Posted
by George
on Stack Overflow
See other posts from Stack Overflow
or by George
Published on 2010-05-26T02:56:49Z
Indexed on
2010/05/26
3:01 UTC
Read the original article
Hit count: 260
Hello guys, I'm here again with another question about MVC.
Here is the deal. I have a simple table/class with an Id and a Name. Names suppossed to be unique, and are modeled like that in the DB.
I created my controller and everything just works fine. But if I try to insert a name that already exists, an exception should be thrown. I'm just not finding what is the correct kind of exception and it's namespace. The error must be coming from the DB, so...
Any ideas?
Thanks
© Stack Overflow or respective owner