//Gets the performance for update using a lamda public IActionResult OnGet(int?id) { if (id == null) { return(NotFound()); } TaskPerformance = _context.TaskPerformance .Include(t => t.Operator) .Include(t => t.Task).FirstOrDefault(m => m.Id == id); if (TaskPerformance == null) { return(NotFound()); } ViewData["OperatorId"] = new SelectList(_context.Operator, "Id", "Name"); ViewData["TaskId"] = new SelectList(_context.Set <Business.Task>(), "Id", "Name"); return(Page()); }
//Gets a task performance create form. public IActionResult OnGet() { ViewData["OperatorId"] = new SelectList(_context.Operator, "Id", "Name"); ViewData["TaskId"] = new SelectList(_context.Set <Task>(), "Id", "Name"); return(Page()); }