public SchoolController(ISchoolPerformanceRepository <SchoolResult> result, ISchoolPerformanceRepository <SchoolContextual> contextual, ILogger <SchoolController> logger) { _result = result; _contextual = contextual; _logger = logger; }
public TablesController(ISchoolPerformanceRepository <SchoolResult> result, IRedisCache cache, ILogger <TablesController> logger) { _result = result; _cache = cache; _logger = logger; }
public AutoCompleteService(ISchoolPerformanceRepository <SchoolResult> result, IRedisCache cache, ILogger <AutoCompleteService> logger) { _result = result; _schools = new List <AutocompleteViewModel>(); _cache = cache; _logger = logger; }
public void Setup() { //Create an InMemory Sqlite Database for testing var connection = new InMemorySqliteConnection(); _context = connection._context; //Create the repository class that will be tested _repositorySchool = new SchoolPerformanceRepository <School>(_context); _repositorySchoolResult = new SchoolPerformanceRepository <SchoolResult>(_context); //Mock data SetData(); //Remove existing seeded data ClearSeedData(); //Add and save the mock data to the context _schools.ForEach(x => _context.School.Add(x)); _schoolResults.ForEach(x => _context.SchoolResult.Add(x)); _context.SaveChanges(); }