void HackAll(string companyId, ICommand command) { var document = new CompetitionDivisions(companyId); document.Levels = GenerateLevels(companyId); document.AwardsLevels = GenerateAwardsLevels(companyId); document.Divisions = GenerateDivisions(companyId, command); document.Validate(); RavenSession.Store(document); RavenSession.SaveChanges(); }
public LevelIndexViewModel(CompetitionDivisions info) { Info = info; Levels = info.Levels.ToDictionary(x => x.Id, x => x.Name); Divisions = info.Divisions.GroupBy(x => x.LevelId).ToDictionary(x => x.Key, x => x.Select(d => d.Name).ToList()); }