public async Task <IActionResult> Edit(Guid id, [Bind("DateDev,StepDev,Id,Description,Changes,DateStart,DateEnd")] TableForDeveloper tableForDeveloper) { if (id != tableForDeveloper.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tableForDeveloper); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TableForDeveloperExists(tableForDeveloper.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tableForDeveloper)); }
public async Task <IActionResult> Create([Bind("DateDev,StepDev,Id,Description,Changes,DateStart,DateEnd")] TableForDeveloper tableForDeveloper) { if (ModelState.IsValid) { tableForDeveloper.Id = Guid.NewGuid(); _context.Add(tableForDeveloper); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tableForDeveloper)); }