示例#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));
        }
示例#2
0
        public async Task <ActionResult <ResponseBase <bool> > > DeleteSpaceAsync(Guid venueId, Guid spaceId)
        {
            bool result = await _spaceProvider.DeleteSpaceAsync(venueId, spaceId);

            return(new ResponseBase <bool>(result));
        }