private void LoadHops(BeerRecipeCore.Styles.Style style, List <CommonHop> commonHops) { foreach (var commonHop in commonHops) { var beerRecipeCoreCommonHop = _mapper.Map <CommonHop, BeerRecipeCore.Styles.CommonHop>(commonHop); beerRecipeCoreCommonHop.Hop = GetHop(commonHop.HopId); style.CommonHops.Add(beerRecipeCoreCommonHop); } }
private void LoadFermentables(BeerRecipeCore.Styles.Style style, List <CommonGrain> commonGrains) { foreach (var commonGrain in commonGrains) { var fermentable = GetFermentable(commonGrain.FermentableId); style.CommonGrains.Add(new BeerRecipeCore.Styles.CommonGrain { Fermentable = fermentable, ProportionOfGrist = commonGrain.ProportionOfGrist }); } }