In Asp.Net vNEXT (the older version of Asp.Net Core), i could get the ViewComponent drawed as a string by calling Component.Invoke(XXX).ToString() or something like that very easy.
But now the current version Asp.net Core, the Invoke is removed and you can only call the InvokeAsync.
So i call the invoke async like this:
@{
string text = (await Component.InvokeAsync(typeof(Foo)).ToString();
}
then the "text" variable will become "Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewBuffer". And thats the name of a class or something, then the string that it was supposed to draw.
So... how do get the string in the newest version?