I got Async private method that call 3rd party WCF service and in return it get string value. I have added await to the WCF call but getting error
error
'string' does not contain a definition for GetAwaiter and no accessible extension method accepting first argument of type string
code
private async Task<string> InitializeCall()
{
string response = string.Empty;
response = await eziClient.GetTransactionsAsync(username, "", BatchNumber.ToString(), "").GetAwaiter().GetResult();
return response;
}
not sure what I missing here?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…