コード例 #1
0
        public async Task <IActionResult> CleanTmpFolders()
        {
            var pathList = new List <string> ()
            {
                Path.Combine(_hostingEnvironment.ContentRootPath, "AfterExtract"),
                Path.Combine(_hostingEnvironment.ContentRootPath, "AfterTransform")
            };
            await _fileLoader.CleanFolders(pathList);

            return(Ok());
        }
コード例 #2
0
        public async Task LoadFromFiles()
        {
            await InitSender(WorkMode.Partial);

            var path = Path.Combine(_hostingEnvironment.ContentRootPath, "AfterExtract");

            foreach (var fileContent in _fileLoader.GetNextFileContent(path))
            {
                await Transform(fileContent);
            }
            await _fileLoader.CleanFolders(new List <string>() { path });
        }
コード例 #3
0
ファイル: Loader.cs プロジェクト: ChuZZZta/ETL-StudyProject
        public async Task LoadFromFiles()
        {
            var beforeLoadCount = await GetNumgerOfRecords();

            var path = Path.Combine(_hostingEnvironment.ContentRootPath, "AfterTransform");

            foreach (var fileContent in _fileLoader.GetNextFileContent(path))
            {
                await Load(fileContent);
            }
            var afterLoadCount = await GetNumgerOfRecords();

            _logger.Log($"Load {afterLoadCount - beforeLoadCount} records to database");
            await _fileLoader.CleanFolders(new List <string>() { path });
        }