Exemplo n.º 1
0
            public T Update(T entity)
            {
                var result = _service.Update(entity);

                if (_failoverService == null)
                {
                    return(result);
                }
                if (!_allowInconsistentReplication)
                {
                    _failoverService.Update(entity);
                }
                else
                {
                    try
                    {
                        _failoverService.Update(entity);
                    }
                    catch (Exception ex)
                    {
                        if (_logger != null)
                        {
                            _logger(ex);
                        }
                    }
                }
                return(result);
            }
Exemplo n.º 2
0
            public T Update(T entity)
            {
                var tenant = (ITenant)entity;

                if (tenant.TenantId == _owner.TenantId)
                {
                    return(_service.Update(entity));
                }
                throw new InvalidOperationException();
            }
Exemplo n.º 3
0
 public T Update(T entity)
 {
     try
     {
         return(_service.Update(entity));
     }
     finally
     {
         if (_failoverService != null)
         {
             _failoverService.Update(entity);
         }
     }
 }
Exemplo n.º 4
0
 public T Update(T entity)
 {
     _repository.BeforeUpdate(entity, _paths);
     return(_service.Update(entity));
 }