Example #1
0
        public async Task <IActionResult> Edit(Guid id, [Bind("DateTest,IntegrationTest,SystemTest,Id,Description,Changes,DateStart,DateEnd")] TableForTester tableForTester)
        {
            if (id != tableForTester.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tableForTester);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TableForTesterExists(tableForTester.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tableForTester));
        }
Example #2
0
        public async Task <IActionResult> Create([Bind("DateTest,IntegrationTest,SystemTest,Id,Description,Changes,DateStart,DateEnd")] TableForTester tableForTester)
        {
            if (ModelState.IsValid)
            {
                tableForTester.Id = Guid.NewGuid();
                _context.Add(tableForTester);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(tableForTester));
        }