public void Save(Bookmark bookmark) { using (var db = new IDataContext()) { db.Bookmarks.Add(bookmark); db.SaveChanges(); } }
public ActionResult SaveBookMark(string url) { var bookmark = new Bookmark(); bookmark.Save(new Bookmark { Link = url, Title = "Google", Description = "Sample Description", Member = 1, Status = "Active" }); return Json(new { Output = "Saved" }, JsonRequestBehavior.AllowGet); }
public void CanSaveBookmark() { var bookmark = new Bookmark(); bookmark.Save(new Bookmark { Title = "title", Link = "http://www.google.com", Description = "awetasdfasdf", Member = 1, Status = "Active" }); Assert.Inconclusive("Saved"); }
public ActionResult GetSiteDetails() { var bookmark = new Bookmark(); return Json(bookmark.GetList().OrderByDescending(c => c.ID), JsonRequestBehavior.AllowGet); }