Пример #1
0
        public async Task AddNewReview(string venueId, Review review)
        {
            var venue = await _venuesDbRepository.FindAsync(venueId);

            venue.Reviews.Add(review);
            await _venuesDbRepository.UpdateAsync(venue);
        }
Пример #2
0
        public async Task ChangeWorkingStatusAsync(string venueId)
        {
            var venue = await _venuesDbRepository.FindAsync(venueId);

            venue.WorkHours.IsWorking = !venue.WorkHours.IsWorking;
            await _venuesDbRepository.UpdateAsync(venue);
        }
Пример #3
0
        public async Task AddAsync(Tag tag, string venueId)
        {
            var venue = await _venuesDbRepository.FindAsync(venueId);

            var venueTag = new VenueTag(venue, tag);

            venue.VenueTags.Add(venueTag);
            tag.VenueTags.Add(venueTag);
            _defaultDbSet.Add(tag);
            await _venuesDbRepository.UpdateAsync(venue);
        }