Ejemplo n.º 1
0
        public async Task <IActionResult> DeleteElectronic(int id)
        {
            Electronic elect = await ElectronicsDb.GetElectronicAsync(_context, id);

            _context.Entry(elect).State = EntityState.Deleted;
            await _context.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Delete(int id)
        {
            Electronic elect = await ElectronicsDb.GetElectronicAsync(_context, id);

            return(View(elect));
        }