Exemplo n.º 1
0
        private RecipeListService CreateRecipeListService()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new RecipeListService(userId);

            return(service);
        }
Exemplo n.º 2
0
        // GET: RecipeList
        public ActionResult Index()
        {
            var userID  = Guid.Parse(User.Identity.GetUserId());
            var service = new RecipeListService(userID);
            var model   = service.GetRecipeList();

            return(View(model));
        }
Exemplo n.º 3
0
        public ActionResult Create(RecipeListCreate model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var userID  = Guid.Parse(User.Identity.GetUserId());
            var service = new RecipeListService(userID);

            //if (service.CreateRecipeList(model))
            //{
            //    return RedirectToAction("Index");
            //}

            return(View(model));
        }