The following code has been working in .netcoreapp3.1 but it stopped working after migrating the Http-triggered function to .NET 5.0:
public static class AddToGroup
{
[Function("addtogroup")]
public static Task Run(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = "addtogroup/{trnantId}/{userId}")]
HttpRequestData req,
string tenantId,
string userId,
[SignalR(HubName = "testhub")]
IAsyncCollector<SignalRGroupAction> signalRGroupActions,
FunctionContext executionContext)
{
return signalRGroupActions.AddAsync(new SignalRGroupAction
{
UserId = $"{tenantId}_{userId}",
GroupName = tenantId,
Action = GroupAction.Add
});
}
}
Could anybody throw a guidance on an equivalent of this code in .NET 5.0?