コード例 #1
0
        public async Task <BreweryMemberDto> DeleteMember(int breweryId, string username)
        {
            var breweryMemberDto = await _breweryElasticsearch.GetSingleMemberAsync(breweryId, username);

            await _breweryRepository.DeleteMember(breweryId, username);

            var brewery = await _breweryRepository.GetSingleAsync(breweryId, "Members.Member", "Origin", "Beers", "Socials", "Beers.Beer.IBU", "Beers.Beer.ABV", "Beers.Beer.SRM", "Beers.Beer.BeerStyle");

            var breweryDto = Mapper.Map <Brewery, BreweryDto>(brewery);
            await _breweryElasticsearch.UpdateAsync(breweryDto);

            await _userService.ReIndexUserElasticSearch(username);

            return(breweryMemberDto);
        }