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