public void SendMessage(string routeName, string payload) { if (string.IsNullOrWhiteSpace(CurrentServer)) { throw new InvalidOperationException(ERROR_SERVER_IS_NOT_DEFINED); } Guid handle = SqlScripts.ExecuteScalar <Guid>(ConnectionString, SqlScripts.SelectDialogHandleScript(routeName)); string sql = SqlScripts.SendMessageToChannelScript(); Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("handle", handle); parameters.Add("message", payload); SqlScripts.ExecuteScript(ConnectionString, sql, parameters); }