Ejemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("ID,Name")] SquasherModel squasherModel)
        {
            if (ModelState.IsValid)
            {
                _context.Add(squasherModel);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(squasherModel));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("ID,Title,Description,Severity,Version,TrackDate")] BugModel bugModel)
        {
            if (ModelState.IsValid)
            {
                _context.Add(bugModel);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(bugModel));
        }
        public async Task <IActionResult> Create([Bind("ID,Title")] ProjectModel projectModel)
        {
            if (ModelState.IsValid)
            {
                _context.Add(projectModel);
                await _context.SaveChangesAsync();

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