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