public void Addbookmark(Bookmark bookmark) { var repo = new BookmarkRepository(_connectionString); var repo2 = new UserRepository(_connectionString); var user = repo2.GetUserByEmail(User.Identity.Name); bookmark.UserId = user.Id; repo.AddBookmark(bookmark); }
public void AddBookmark(Bookmark bm) { var user = GetCurrentUser(); bm.UserId = user.Id; var repo = new BookmarkRepository(_connectionString); repo.AddBookmark(bm); }