public App.Dto.Res.Add.Common.Connection Add(App.Dto.Req.Add.Common.Connection request, CancellationToken cancellationToken = default) { CallOptions = CallOptions.WithCancellationToken(cancellationToken); CallContext = new CallContext(CallOptions, CallContextFlags.IgnoreStreamTermination); App.Dto.Res.Add.Common.Connection output = new App.Dto.Res.Add.Common.Connection(); try { using (Channel) { ICommand client = Channel.CreateGrpcService <ICommand>(); var result = client.AddConnection(request, CallContext); output = result; } } catch (Exception ex) { Logger.LogError(GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name + " - " + ex.Source + " " + ex.Message + " " + ex.StackTrace); } return(output); }