예제 #1
0
        public async Task <ActionResult> Delete(int id)
        {
            var entity = await _context.Usuarios.FirstOrDefaultAsync(n => n.Id == id);

            if (entity == null)
            {
                return(NotFound());
            }
            _context.Remove(entity);
            await _context.SaveChangesAsync();

            return(Ok());
        }