public void Add(Guid id, string key) { try { _databaseGateway.ExecuteUsing(_queryFactory.Add(id, key)); } catch (Exception ex) { if (ex.Message.ToLower().Contains("violation of primary key constraint")) { throw new DuplicateKeyException(id, key); } throw; } }
public void Add(Guid id, string key) { _databaseGateway.ExecuteUsing(_queryFactory.Add(id, key)); }