コード例 #1
0
        public async Task <IActionResult> UpdateConcert([FromBody] ConcertPayload payload)
        {
            var concert = await SingleOrError(_concertsRepo.FindOne(EntityId));

            await _concertsRepo.Update(concert, payload);

            return(Ok());
        }
コード例 #2
0
        public async Task <IActionResult> SetAttendance([FromRoute] int concertId, [FromBody] bool attending)
        {
            var concert = await SingleOrError(_concertsRepo
                                              .FindOne(new ConcertIdentifier(GroupId, concertId))
                                              .Include(_ => _.Attendances.Where(a => a.UserId == RequestingUserId)));

            await _concertsRepo.SetUserAttendance(concert, RequestingUserId, attending);

            return(Ok());
        }