Reputation: 764
I've done the Plugins.Add(new AutoQueryFeature { MaxLimit = 100 }); and used it in startup Configure Method.
This is dto inherites QueryDb
I keep encountering AutoQuery is null and NullReferenceException thrown at AutoQuery.CreateQuery() Method. And CallStacks can not show ExternalCodes. I have no ideas where it gone wrong by referring to TechStacks Project.
The project references ServiceStack.Core 5.7.0
I'm able to get AutoQuery by using the below code.
var autoquery = TryResolve<IAutoQueryDb>()
Upvotes: 1
Views: 136
Reputation: 143359
None of your code samples show the 3 important things required for AutoQuery, the AutoQueryFeature
plugin registration in your AppHost’s Configure()
, the definition of your Service class that implements the Service
base class, the public IAutoQueryDb AutoQuery { get; set; }
public property.
If they’re configured correctly the IAutoQueryDb dependency should be injected.
Upvotes: 1