Exemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("InitX,X,InitY,Y,Period,Id")] Incl incl)
        {
            if (ModelState.IsValid)
            {
                _context.Add(incl);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(incl));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("InitValue,Value,Period,Id")] Gap gap)
        {
            if (ModelState.IsValid)
            {
                _context.Add(gap);
                await _context.SaveChangesAsync();

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