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)); }
public async Task <List <VenueImageDto> > GetVenueImagesAsync(Guid venueId) { return(await _venueImageRepo.GetVenueImagesAsync(venueId)); }