public async Task <ActionResult> Delete(int id)
        {
            await _contratoService.DeleteContrato(id);

            return(NoContent());
        }
 public async Task <Contrato> Deletar([FromServices] DataContext context, int id)
 {
     return(await contratoService.DeleteContrato(id));
 }