private RecipeListService CreateRecipeListService() { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new RecipeListService(userId); return(service); }
// GET: RecipeList public ActionResult Index() { var userID = Guid.Parse(User.Identity.GetUserId()); var service = new RecipeListService(userID); var model = service.GetRecipeList(); return(View(model)); }
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)); }