/// <summary> /// Retrieves a list of all brewery entities in the context. /// </summary> /// <returns></returns> /// <exception cref="BreweryNotFoundException"></exception> public ICollection <Brewery> GetBreweries() { var breweries = _breweryRepository.FindAllBreweries(); if (!breweries.Any()) { Log.Information("BreweryService::FindAllBreweries - No breweries found"); throw new BreweryNotFoundException("No breweries found"); } return(breweries); }