public void Update(Message message)
        {
            var existing = Get(message.Id);

            if (existing == null)
            {
                // TODO: do something
                return;
            }

            existing.Title = message.Title;
            existing.Content = message.Content;
        }
        public IActionResult Edit(Message model)
        {
            var message = _messages.Get(model.Id);

            if (message == null)
            {
                return HttpNotFound();
            }

            _messages.Update(model);

            return RedirectToAction("index");
        }