I am trying to call a method that changes the Type at runtime. And I am using the data from the HTTP request to extract the name of the Type. For example.
If the http request is /pets/Dog then I am using the Dog as the type for my getData call. For example
var data = await dbAccessor.GetData<Dog>(id)
And if the URL was /pets/Cat then my method call will be as follows
var data = await dbAccessor.GetData<Cat>(id)
But I am getting the error that says "Cannot await 'method group' ", does anyone know what this means? Below is how my method is defined.
public async Task<SomeModel<AnotherModel>> GetId (string id) {
// this.x.y will extract the name from request
var data = await dbAccessor.GetData<this.x.y>(id);
}