Exemplo n.º 1
0
        public async Task <bool> DeleteVenueAsync(Guid venueId)
        {
            //Delete in Order so as not to violate SQL table constraints
            List <SpaceResponse> spaces = await _spaceProvider.GetSpacesAsync(venueId, false);

            spaces.ForEach(async space => await _spaceProvider.DeleteSpaceAsync(venueId, space.SpaceId));

            List <VenueImageDto> venueImageDtos = await _venueImageRepo.GetVenueImagesAsync(venueId, false);

            if (venueImageDtos.Count() > 0)
            {
                await _venueImageRepo.DeleteVenueImagesAsync(venueImageDtos);
            }

            return(await _venueRepo.DeleteVenueAsync(venueId));
        }
Exemplo n.º 2
0
        public async Task <bool> DeleteVenueImagesAsync(List <Guid> venueImageIds, Guid venueId)
        {
            List <VenueImageDto> venueImageDtos = venueImageIds.MapVenueIdDetailsToDtos(venueId);

            return(await _venueImageRepo.DeleteVenueImagesAsync(venueImageDtos));
        }