public override void Update() { try { Repository.Update(DatabaseEntity); } catch (Exception exception) { if (DbExceptionUtil.IsDbConcurrencyException(exception)) { throw new ConcurrencyException("Concurrency error", exception); } throw; } }
public override void Insert() { try { EnsureRepositoryIsNotNull(); Repository.Insert(DatabaseEntity); } catch (Exception exception) { if (DbExceptionUtil.IsDbConcurrencyException(exception)) { throw new ConcurrencyException("Concurrency error", exception); } throw; } }