Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
 public void Add(Guid id, string key)
 {
     _databaseGateway.ExecuteUsing(_queryFactory.Add(id, key));
 }