Example #1
0
        public ActionResult Delete(BookmarkView bookmarkView)
        {
            bool     updating = true;
            Bookmark bookmark = Bookmark.FromBookmarkView(bookmarkView, updating);

            return(View(bookmark));
        }
Example #2
0
        public ActionResult Create(BookmarkView bookmarkview)
        {
            User loggedUser = OnlineUsers.GetSessionUser();

            Bookmark bookmark = Bookmark.FromBookmarkView(bookmarkview);

            DB.Bookmarks.Add(bookmark);

            DB.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #3
0
        public ActionResult Edit(BookmarkView bookmarkView)
        {
            if (ModelState.IsValid)
            {
                bool     updating = true;
                Bookmark bookmark = Bookmark.FromBookmarkView(bookmarkView, updating);



                DB.Update(bookmark);

                DB.SaveChanges();
            }
            return(View(bookmarkView));
        }