public async Task <IActionResult> PutTpPeople(Guid id, TpPeople tpPeople)
        {
            if (id != tpPeople.PeplId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Example #2
0
        public async Task <IActionResult> PutTpGuestDeliveries([FromBody] TpGuestDeliveries tpGuestDeliveries)
        {
            //if(id != tpGuestDeliveries.GsdlvGestId) {
            //    return BadRequest();
            //}

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

            try {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException) {
                //if(!TpGuestDeliveriesExists(id)) {
                return(BadRequest());
                //}
                //else {
                //    throw;
                //}
            }

            return(Accepted());
        }
        public async Task <IActionResult> PutTpUserLocationPresence([FromBody] TpUserLocationPresence tpUserLocationPresence)
        {
            //if(id != tpUserLocationPresence.UslpId) {
            //    return BadRequest();
            //}

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

            try {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException) {
                if (!TpUserLocationPresenceExists(tpUserLocationPresence.UslpId))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(Accepted());
        }