public void SaveExceptionLog(Exception ex) { var model = new ExceptionLog() { Message = ex.Message.ToString(), StackTrace = ex.StackTrace.ToString() }; using (var connection = new MySqlConnection(connString)) { connection.Execute(MySqlDbQuery.SaveExceptionLog(), ex); } }