示例#1
0
        public RecipeEntryModel(Recipe recipe)
        {
            EntryRecipeId    = recipe.RecipeId;
            EntryRecipeName  = recipe.RecipeName;
            EntryExplanation = recipe.Explanation;
            EntryPhotoBytes  = recipe.PhotoBytes;
            EntryRecipeItems = recipe.Items;
            EntryRecipeSteps = recipe.Steps;

            if (recipe.PhotoBytes != null)
            {
                EntryPhotoFileSource = ImageSource.FromStream(() => ImageConversion.BytesToStream(recipe.PhotoBytes));
            }
        }