コード例 #1
0
        public async Task ArchiveAsync(int recordId)
        {
            var userId = await GetUserIdAsync();

            var entity = await _repository.GetRecordAsync(recordId);

            await InvokeGuard(() => _guard.AgainstInvalidRecordArchivalAsync(userId, entity.DatasetId, recordId));

            await _repository.ArchiveRecordAsync(recordId);

            await _unitOfWork.SaveChangesAsync();
        }