public RecipeEditViewModel(Guid recipeId, INavigation nav) : this(nav)
        {
            _recipeId = recipeId;

            var recipe = _dataSvc.GetSingleRecipe(_recipeId);
            RecipeName = recipe.RecipeName;
            CookTime   = recipe.CookTime;
            MakeAgain  = recipe.MakeAgain;

            _isNew = false;
        }
        public RecipeEditViewModel(Guid recipeId, INavigation nav)
        {
            _recipeId = recipeId;
            _nav      = nav;

            _dataSvc = new RecipeDataService();

            var recipe = _dataSvc.GetSingleRecipe(recipeId);

            RecipeName = recipe.RecipeName;
            CookTime   = recipe.CookTime;
            MakeAgain  = recipe.MakeAgain;
        }
Esempio n. 3
0
        void LoadRecipeInformation()
        {
            var svc = new RecipeDataService();

            _theRecipe = svc.GetSingleRecipe(RecipeId);
        }