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(); } }
public void SaveMessage(FlockMessage message) { message.CreateDateTime = DateTime.Now; _messageRepository.Add(message); }
public void UpdateMessage(FlockMessage message) { _messageRepository.Update(message); }
public HttpResponseMessage Put(FlockMessage message) { _messageFacade.UpdateMessage(message); return Request.CreateResponse(HttpStatusCode.Created, message); }