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