C# Класс SqlFu.ExceptionHelpers

Показать файл Открыть проект

Открытые методы

Метод Описание
IsUniqueViolation ( this db, DbException ex, string keyName = null ) : bool

Checks is the exception was thrown because an unique constraint was violated. Can be used to implement idempotency e.g you can treat primary key violations as duplicate operations

Описание методов

IsUniqueViolation() публичный статический Метод

Checks is the exception was thrown because an unique constraint was violated. Can be used to implement idempotency e.g you can treat primary key violations as duplicate operations
public static IsUniqueViolation ( this db, DbException ex, string keyName = null ) : bool
db this
ex System.Data.Common.DbException
keyName string
Результат bool