public async Task RemoveFromMyConcertsAsync(int concertId, string userId) { var userConcert = new UserConcert { UserId = userId, ConcertId = concertId, }; this.userConcertRepository.Delete(userConcert); await this.userConcertRepository.SaveChangesAsync(); }
public async Task AddToMyConcertsAsync(int concertId, string userId) { if (await this.IsInMyConcertsAsync(concertId, userId)) { return; } var userConcert = new UserConcert { UserId = userId, ConcertId = concertId, }; await this.userConcertRepository.AddAsync(userConcert); await this.userConcertRepository.SaveChangesAsync(); }