Exemplo n.º 1
0
        int MergeSecondaryResultRecipes(Item source, Item target)
        {
            var asSecondaryResult = _recipeRepository.GetBySecondaryResult(source).ToArray();

            foreach (var r in asSecondaryResult)
            {
                r.SecondaryResults.Remove(source);
                r.SecondaryResults.Add(target);
                _recipeRepository.Save(r);
            }
            return(asSecondaryResult.Length);
        }