public override TEntity Update(TEntity entity) { ActionFilterExecuter.ExecuteModificationAuditFilter <TEntity, string>(entity); IDocumentResult <TEntity> result = Session.Bucket.Upsert(new Document <TEntity> { Content = entity, Id = $"{typeof(TEntity).Name}:{entity.Id}" }); result.EnsureSuccess(); return(result.Content); }
public override TEntity Update(TEntity entity) { ActionFilterExecuter.ExecuteModificationAuditFilter<TEntity, string>(entity); EntityChangeEventHelper.PublishEntityUpdatingEvent(entity); IDocumentResult<TEntity> result = Session.Bucket.Upsert(new Document<TEntity> { Content = entity, Id = $"{typeof(TEntity).Name}:{entity.Id}" }); result.EnsureSuccess(); EntityChangeEventHelper.PublishEntityUpdatedEventOnUowCompleted(entity); return result.Content; }