public async Task <ActionResult <tipoPago> > PosttipoPago(tipoPago tipoPago)
        {
            _context.tipoPagos.Add(tipoPago);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GettipoPago", new { id = tipoPago.TipoPagoId }, tipoPago));
        }
        public async Task <IActionResult> PuttipoPago(int id, tipoPago tipoPago)
        {
            if (id != tipoPago.TipoPagoId)
            {
                return(BadRequest());
            }

            _context.Entry(tipoPago).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!tipoPagoExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }