I'd rather not do string comparison and it looks like my exeption number is in the InnerExeption number field but I get build errors if I try to access it directly.
try {
db.SaveChanges();
} catch (Microsoft.Data.Entity.DbUpdateException ex) {
// ex.InternalException.Number won't compile but appears to be there
// ex.InternalException.Message does compile but I think it seems less clean than a const comparison
}
Once I do get the number is there a const I can compare it with? I'm trying to check for duplicate key error.
Thanks