Exemplo n.º 1
0
        public async Task <bool> Excluir(int id)
        {
            try
            {
                var estrategia = await _context.Estrategia.FindAsync(id);

                _context.Remove(estrategia);
                await _context.SaveChangesAsync();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        public async Task <bool> Excluir(int id)
        {
            try
            {
                var candidato = await _context.Candidato.FindAsync(id);

                _context.Remove(candidato);
                await _context.SaveChangesAsync();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }