public static IngredientDetail FromIngredientDetail(IIngredientDetail ingredientDetail)
        {
            Sellars.Data.Model.ModelId <IRecipe> id = ingredientDetail.Ingredient.Id;
            IngredientDetail i = new IngredientDetail
            {
                Ingredient   = ingredientDetail.Ingredient.Name,
                IngredientId = id == null ? Guid.Empty : id.Id,
                Quantity     = ingredientDetail.Quantity,
                Amount       = ingredientDetail.Amount,
                AmountMax    = ingredientDetail.AmountMax,
                Unit         = Unit.FromUnit(ingredientDetail.Unit),
                Preparation  = GetPreparationString(ingredientDetail.Preparation)
            };

            return(i);
        }
 public static IngredientDetail FromIngredientDetail(IIngredientDetail ingredientDetail)
 {
     Sellars.Data.Model.ModelId<IRecipe> id = ingredientDetail.Ingredient.Id;
      IngredientDetail i = new IngredientDetail
      {
     Ingredient = ingredientDetail.Ingredient.Name,
     IngredientId = id == null ? Guid.Empty : id.Id,
     Quantity = ingredientDetail.Quantity,
     Amount = ingredientDetail.Amount,
     AmountMax = ingredientDetail.AmountMax,
     Unit = Unit.FromUnit (ingredientDetail.Unit),
     Preparation = GetPreparationString (ingredientDetail.Preparation)
      };
      return i;
 }