New feature: csv export

This commit is contained in:
Robert McRackan 2020-09-11 17:04:36 -04:00
parent b1f92343cf
commit 2795690199
7 changed files with 326 additions and 8 deletions

View file

@ -24,7 +24,7 @@ namespace ApplicationServices
var totalCount = importItems.Count;
Log.Logger.Information($"GetAllLibraryItems: Total count {totalCount}");
var newCount = await getNewCountAsync(importItems);
var newCount = await importIntoDbAsync(importItems);
Log.Logger.Information($"Import: New count {newCount}");
await Task.Run(() => SearchEngineCommands.FullReIndex());
@ -75,7 +75,7 @@ namespace ApplicationServices
return dtoItems.Select(d => new ImportItem { DtoItem = d, AccountId = account.AccountId, LocaleName = localeName }).ToList();
}
private static async Task<int> getNewCountAsync(List<ImportItem> importItems)
private static async Task<int> importIntoDbAsync(List<ImportItem> importItems)
{
using var context = DbContexts.GetContext();
var libraryImporter = new LibraryImporter(context);