public async Task <int> Handle(DeleteProposta request, CancellationToken cancellationToken) { var proposta = await _context.TbProposta.FindAsync(request.Id); _context.TbProposta.Remove(proposta); return(await _context.SaveChangesAsync(cancellationToken)); }
public async Task <int> Handle(DeletePropostaSegurado request, CancellationToken cancellationToken) { var tbPropostaSegurado = await _context.TbPropostaSegurado.FindAsync(request.Id); _context.TbPropostaSegurado.Remove(tbPropostaSegurado); return(await _context.SaveChangesAsync(cancellationToken)); }
public async Task <int> Handle(UpdateProposta request, CancellationToken cancellationToken) { _context.TbProposta.Update(request.Proposta); return(await _context.SaveChangesAsync(cancellationToken)); }