public void UpdateWithBookmarkView(BookmarkView bookmarkView) { Id = bookmarkView.Id; Name = bookmarkView.Name; Url = bookmarkView.Url; Shared = bookmarkView.Shared; UserId = bookmarkView.OwnerId; CategoryId = bookmarkView.CategoryId; }
public BookmarkView CreateBookmarkView() { BookmarkView bookmarkView = new BookmarkView(); bookmarkView.Id = Id; bookmarkView.Name = Name; bookmarkView.Url = Url; bookmarkView.Shared = Shared; bookmarkView.OwnerId = UserId; bookmarkView.CategoryId = CategoryId; return(bookmarkView); }
public static Bookmark FromBookmarkView(BookmarkView bookmarkView) { Bookmark bookmark = new Bookmark(); bookmark.Id = bookmarkView.Id; bookmark.Name = bookmarkView.Name; bookmark.Url = bookmarkView.Url; bookmark.Shared = bookmarkView.Shared; bookmark.UserId = bookmarkView.OwnerId; bookmark.CategoryId = bookmarkView.CategoryId; return(bookmark); }