Exemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name")] Programming_Skills_Ar programming_Skills_Ar)
        {
            if (id != programming_Skills_Ar.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(programming_Skills_Ar);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Programming_Skills_ArExists(programming_Skills_Ar.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(programming_Skills_Ar));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("Id,Name")] Programming_Skills_Ar programming_Skills_Ar)
        {
            if (ModelState.IsValid)
            {
                _context.Add(programming_Skills_Ar);
                await _context.SaveChangesAsync();

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