Exemple #1
0
        public async Task <IActionResult> PutEvent(int id, Event @event)
        {
            if (id != @event.Id)
            {
                return(BadRequest());
            }

            _context.Entry(@event).State = EntityState.Modified;

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

            return(NoContent());
        }
        public async Task <IActionResult> PutPointMembers(int id, PointMembers pointMembers)
        {
            if (id != pointMembers.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }