public ActionResult DeleteLevels(ResetLevelsCommand command) { if (command.CommandByUser != AccountController.Administrator) return Content("Yes"); var levels = RavenSession .LoadStartingWith<Level>(Level.FormatId(CurrentCompanyId)); levels.ToList().ForEach(RavenSession.Delete); RavenSession.SaveChanges(); return Content("Ok"); }
public ActionResult ResetLevels(ResetLevelsCommand command) { HackAll(CurrentCompanyId, command); HackLevels(CurrentCompanyId); HackDivisions(CurrentCompanyId, command); return Content("Ok"); }