示例#1
0
        public void CreateMessageDocuments()
        {
            var flockMessage = new FlockMessage()
            {
                Id="flockMessage/2",
                Message = "sample message 1 from unit test",
                CreateDateTime = DateTime.Now,
                CreateUserId = "User 1",
                IsLiked = false
            };

            using (var session = _documentStore.OpenSession("Flock"))
            {
                session.Store(flockMessage);
                session.SaveChanges();
            }
        }
示例#2
0
 public void SaveMessage(FlockMessage message)
 {
     message.CreateDateTime = DateTime.Now;
     _messageRepository.Add(message);
 }
示例#3
0
 public void UpdateMessage(FlockMessage message)
 {
     _messageRepository.Update(message);
 }
示例#4
0
 public HttpResponseMessage Put(FlockMessage message)
 {
     _messageFacade.UpdateMessage(message);
     return Request.CreateResponse(HttpStatusCode.Created, message);
 }