// GET: BookmarkEntities/Edit/5 public async Task <IActionResult> Edit(int?id) { if (id == null) { return(NotFound()); } var bookmarkEntity = await _context.BookmarkEntity.SingleOrDefaultAsync(m => m.Id == id); if (bookmarkEntity == null) { return(NotFound()); } ViewBag.Types = BookmarkEntity.GetTypeAsSelectList(bookmarkEntity.BookmarkType); return(toEdit(bookmarkEntity)); }
public IActionResult EditFromPath(string Parent, string returnUrl) { if (Parent == null) { return(NotFound()); } Tuple <string, string> tuple = GetFolderAndParentFolder(Parent.Replace("item-", "").Replace("-", "|")); var bookmark = bookmarkEntityRepo.GetBookMarkByNameAndParentPath(tuple.Item1, tuple.Item2); if (bookmark == null) { return(NotFound()); } ViewBag.returnUrl = returnUrl; ViewBag.Types = BookmarkEntity.GetTypeAsSelectList(bookmark.BookmarkType); return(toEdit(bookmark)); }