public FootieDataManagerContextSeed(IWebHostEnvironment env, IConfiguration configuration, UserManager <ApplicationUser> userManager, ICsvDataRetriever csvDataRetriever) { env = env ?? throw new ArgumentNullException(nameof(env)); configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); _seedFilesPath = Path.GetFullPath(configuration.GetValue <string>("CsvSeedFilesRelativePath"), env.ContentRootPath); _userManager = userManager ?? throw new ArgumentNullException(nameof(userManager)); _csvDataRetriever = csvDataRetriever ?? throw new ArgumentNullException(nameof(csvDataRetriever)); _databaseSeeder = new FootieDataManagerSqlDbSeeder(csvDataRetriever, _seedFilesPath); _memorySeeder = new FootieDataManagerMemoryContextSeeder(csvDataRetriever, _seedFilesPath); }
public FootieDataManagerMemoryContextSeeder(ICsvDataRetriever csvDataRetriever, string filesPath) { _csvDataRetriever = csvDataRetriever; _filesPath = filesPath; }
public FootieDataManagerSqlDbSeeder(ICsvDataRetriever csvDataRetriever, string filesPath) { _csvDataRetriever = csvDataRetriever; _filesPath = filesPath; }