Example #1
0
        public async Task <int> Handle(ReadAssetsFromFileCommand request, CancellationToken cancellationToken)
        {
            try
            {
                List <AssetProperty> assetsOnFile = ReadAssetsWithoutDuplicates();

                await _assetRepository.BulkInsertUpdate(assetsOnFile, request.MaxBatchSize);

                return(await Task.FromResult(assetsOnFile.Count()));
            }
            catch (Exception)
            {
                throw;
            }
        }