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

                return(RedirectToAction(nameof(Index)));
            }
            return(View(result));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("ID,OperationName,difficulty")] Operation operation)
        {
            if (ModelState.IsValid)
            {
                _context.Add(operation);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(operation));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("ID,RequestId")] ErrorViewModel errorViewModel)
        {
            if (ModelState.IsValid)
            {
                _context.Add(errorViewModel);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(errorViewModel));
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> Create([Bind("ID,klasa,role,log")] BattleLog battleLog)
        {
            if (ModelState.IsValid)
            {
                _context.Add(battleLog);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(battleLog));
        }
        public async Task <IActionResult> Create([Bind("ID,Username,Email,Password,AccessLevel,Klasa")] RegisteredUser registeredUser)
        {
            if (ModelState.IsValid)
            {
                _context.Add(registeredUser);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(registeredUser));
        }
Ejemplo n.º 6
0
        public async Task <IActionResult> Create([Bind("ID,BossName,Health,Damage,Difficulty")] Boss boss)
        {
            if (ModelState.IsValid)
            {
                _context.Add(boss);
                await _context.SaveChangesAsync();

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