Alex
RunSynchronously may not be called on a task not bound to a delegate
public async Task InterfaceUserInformationAsync(IDbContext dbContext, Materiallot materiallot, MessageData messageData)
{
MessageBuilderMD messageBuilderMD = new MessageBuilderMD();
messageBuilderMD
.WithMessageData(messageData)
.WithNameOfRequest("To try")
.Build();
// Await the asynchronous SendKafka method
await kafkaContext.SendKafka(messageBuilderMD.GetMessageData(), dbContext);
}
36 replies
RunSynchronously may not be called on a task not bound to a delegate
If its not try this
public void InterfaceUserInformation(IDbContext dbContext, Materiallot materiallot, MessageData messageData)
{
MessageBuilderMD messageBuilderMD = new MessageBuilderMD();
messageBuilderMD
.WithMessageData(messageData)
.WithNameOfRequest("To try")
.Build();
kafkaContext.SendKafka(messageBuilderMD.GetMessageData(), dbContext).GetAwaiter().GetResult();
}
36 replies