public async Task <ActionResult> DeleteConfirmed(int id) { EvaluationModule evaluationModule = await db.EvaluationModule.FindAsync(id); db.EvaluationModule.Remove(evaluationModule); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public void FixtureSetUp() { var builder = new ContainerBuilder(); var evaluationModule = new EvaluationModule(new RunListener(), useSeparateAppDomains: false); builder.RegisterModule(evaluationModule); var container = builder.Build(); _rootRunner = container.Resolve <IRootRunner>(); }
public async Task <ActionResult> Edit([Bind(Include = "Id,IdModule,DateEvaluation,Source,Note,Info")] EvaluationModule evaluationModule) { if (ModelState.IsValid) { db.Entry(evaluationModule).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.IdModule = new SelectList(db.Module, "Id", "Libelle", evaluationModule.IdModule); return(View(evaluationModule)); }
// GET: EvaluationModules/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EvaluationModule evaluationModule = await db.EvaluationModule.FindAsync(id); if (evaluationModule == null) { return(HttpNotFound()); } return(View(evaluationModule)); }
// GET: EvaluationModules/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EvaluationModule evaluationModule = await db.EvaluationModule.FindAsync(id); if (evaluationModule == null) { return(HttpNotFound()); } ViewBag.IdModule = new SelectList(db.Module, "Id", "Libelle", evaluationModule.IdModule); return(View(evaluationModule)); }
public GuessController(RequestContext requestContext, IGameApiService gameApiService, ILogger <GuessController> logger, EvaluationModule evaluationModule, GameContext gameContext) { this.requestContext = requestContext ?? throw new ArgumentNullException("RequestContext"); this.gameApiService = gameApiService ?? throw new ArgumentNullException("GameApiService"); this.logger = logger ?? throw new ArgumentNullException("Logger"); this.evaluationModule = evaluationModule ?? throw new ArgumentNullException("Logger"); this.gameContext = gameContext ?? throw new ArgumentNullException("GameContext"); }