public void Add( DrinkDto drink, IEnumerable< IngredientDto > i ) { if( drinks.Any( d => d.Name == drink.Name ) ) { throw new FaultException( "DuplicateDrink" ); } drinks.Add( drink ); ingredients.Add( drink.Name, i.ToList() ); }
public DrinkAdapter( RecipeBookContract recipes, DrinkDto drinkDto ) { this.recipes = recipes; Name = drinkDto.Name; Method = drinkDto.Method; }