public async Task <IActionResult> Create([Bind("ID,TagName,RegExp")] Tag tag)
        {
            if (ModelState.IsValid)
            {
                _context.Add(tag);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(tag));
        }
Beispiel #2
0
        public async Task <IActionResult> Create([Bind("Id,SubmissionDate,Content")] Decision decision)
        {
            if (ModelState.IsValid)
            {
                _context.Add(decision);
                await _context.SaveChangesAsync();

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