示例#1
0
 public void UpdateMessage(Message message)
 {
     _context.Entry(message).State = EntityState.Modified;
 }
示例#2
0
 // POST: api/Messages
 public void Post(string message)
 {
     var newMessage = new Message {Body = message, Created = DateTime.Now};
     _repository.InsertMessage(newMessage);
     _repository.Save();
 }
示例#3
0
 public void InsertMessage(Message message)
 {
     _context.Messages.Add(message);
 }