Beispiel #1
0
        static public tgConcurrencyException CheckForConcurrencyException(SqlException ex)
        {
            tgConcurrencyException ce = null;

            if (ex.Errors != null)
            {
                foreach (SqlError err in ex.Errors)
                {
                    if (err.Number == 532)
                    {
                        ce        = new tgConcurrencyException(err.Message, ex);
                        ce.Source = err.Source;
                        break;
                    }
                }
            }

            return(ce);
        }
Beispiel #2
0
        static public tgConcurrencyException CheckForConcurrencyException(SqlException ex)
        {
            tgConcurrencyException ce = null;

            if (ex.Errors != null)
            {
                foreach (SqlError err in ex.Errors)
                {
                    if (err.Number == 532)
                    {
                        ce = new tgConcurrencyException(err.Message, ex);
                        ce.Source = err.Source;
                        break;
                    }
                }
            }

            return ce;
        }