internal async Task Seed() { if (!context.Divisions.Any()) { var divisions = await divisionRepository.GetAllDivisions(); foreach (var division in divisions) { await context.AddAsync(division); } } if (!context.Schedules.Any()) { var schedules = await scheduleRepository.GetFbsSchedule(); await context.AddAsync(schedules); } await context.SaveChangesAsync(); }
public List <Division> GetAll() { return(_divisionRepository.GetAllDivisions()); }
public IEnumerable <AppDivision> GetAllDivisions() { return(repository.GetAllDivisions().ToList <Division>().Select(_ => _.ToAppDivision())); }
public ICollection <Division> GetAllDivisions() { return(_divisionRepository.GetAllDivisions()); }