Beispiel #1
0
        public async Task <IActionResult> Edit(int id, [Bind("SetSeriesID,SetSeriesName,LastUpdateDate")] SetSeries setSeries)
        {
            if (id != setSeries.SetSeriesID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(setSeries);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SetSeriesExists(setSeries.SetSeriesID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(setSeries));
        }
Beispiel #2
0
        public async Task <IActionResult> Create([Bind("SetSeriesID,SetSeriesName,LastUpdateDate")] SetSeries setSeries)
        {
            if (ModelState.IsValid)
            {
                _context.Add(setSeries);
                await _context.SaveChangesAsync();

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