public IActionResult Destroy(int id) { Message target = database.Messages .FirstOrDefault(m => m.MessageId == id); database.Remove(target); database.SaveChanges(); return(RedirectToAction("MessageWall")); }