public async Task <ActionResult <TbTypePartner> > PostTbTypePartner(TbTypePartner tbTypePartner)
        {
            _context.TbTypePartner.Add(tbTypePartner);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetTbTypePartner", new { id = tbTypePartner.TypepartnerId }, tbTypePartner));
        }
        public async Task <IActionResult> PutTbTypePartner(int id, TbTypePartner tbTypePartner)
        {
            if (id != tbTypePartner.TypepartnerId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }