private RecipeShoppingListItemModel GetRecipeShoppingListItem(DbRecipeShoppingListItem item) { if (item == null) { return(null); } return(new RecipeShoppingListItemModel { NrOfPersons = item.NrOfPersons, RecipeId = item.RecipeId, RecipeName = item.Recipe.Name }); }
private RecipeShoppingListItemModel ConvertRecipeItem(DbRecipeShoppingListItem recipeItem) { if (recipeItem == null) { return(null); } return(new RecipeShoppingListItemModel { NrOfPersons = recipeItem.NrOfPersons, RecipeId = recipeItem.RecipeId, ShoppingListItemId = recipeItem.ShoppingListItemId, RecipeName = recipeItem.Recipe.Name, IsOnlyUnavailable = recipeItem.IsOnlyUnavailable }); }