public async Task <IActionResult> PutUserpersonas(int id, Userpersonas userpersonas)
        {
            if (id != userpersonas.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <ActionResult <Userpersonas> > PostUserpersonas(Userpersonas userpersonas)
        {
            _context.Userpersonas.Add(userpersonas);
            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateException)
            {
                if (UserpersonasExists(userpersonas.Id))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtAction("GetUserpersonas", new { id = userpersonas.Id }, userpersonas));
        }