예제 #1
0
        public void CreatePost(PostDTOCassandra post, string username)
        {
            var session = _cluster.Connect();
            var newPost = session.Prepare("INSERT INTO posts (PostID, Username ,Text, Date) VALUES(?,?,?, ?)");

            session.Execute(newPost.Bind(post.PostID, username, post.Text, DateTime.Now));
            _stream.SynchronizeStream(session, post);
        }
예제 #2
0
 public void SynchronizeStream(PostDTOCassandra post, ISession session)
 {
     _stream.SynchronizeStream(session, post);
 }