Ejemplo n.º 1
0
        public static void HandleSavePrimaryKeyException(Exception e, string fieldName = "ID")
        {
            PrimaryKeyExceptionInfo fk;

            if (SqlExceptionHelper.IsPrimaryKeyException(e, out fk))
            {
                throw new ValidationError(String.Format(Texts.Validation.SavePrimaryKeyError, fk.TableName, fieldName));
            }
        }