public void Add(TrainingItem entity)
 {
     using (var conn = new SqlConnection(Settings.Default.ConnectionString))
     {
         conn.Open();
         conn.Execute(@"INSERT INTO TrainingItem (MessageId, Topic) VALUES (@MessageId, @Topic)", entity);
     }
 }
        public ActionResult Random(long id, string topic)
        {
            var entity = new TrainingItem() {MessageId = id, Topic = topic};

            _trainingService.Add(entity);

            return Redirect(Url.Action("Random"));
        }