public bool DeleteMessage(int messageId) { Message message = allMessages.FindMessageById(messageId); context.Remove(message); context.SaveChanges(); return(true); }
public IActionResult EditMessage(int id) { var message = allMessages.FindMessageById(id); return(View(message)); }