C# 클래스 SqlFu.ExceptionHelpers

파일 보기 프로젝트 열기: sapiens/SqlFu

공개 메소드들

메소드 설명
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