示例#1
0
        public async Task <ActionResult <TbSignUpPartnerr> > PostTbSignUpPartnerr(TbSignUpPartnerr tbSignUpPartnerr)
        {
            _context.TbSignUpPartnerr.Add(tbSignUpPartnerr);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetTbSignUpPartnerr", new { id = tbSignUpPartnerr.SpId }, tbSignUpPartnerr));
        }
示例#2
0
        public async Task <IActionResult> PutTbSignUpPartnerr(int id, TbSignUpPartnerr tbSignUpPartnerr)
        {
            if (id != tbSignUpPartnerr.SpId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }