Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Last active February 7, 2024 04:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gistlyn/e88328645796a3df65806994fe47b4b1 to your computer and use it in GitHub Desktop.
Save gistlyn/e88328645796a3df65806994fe47b4b1 to your computer and use it in GitHub Desktop.
Configure AutoQuery Services
dotnet add package ServiceStack.Server
using ServiceStack;
[assembly: HostingStartup(typeof(MyApp.ConfigureAutoQuery))]
namespace MyApp;
public class ConfigureAutoQuery : IHostingStartup
{
public void Configure(IWebHostBuilder builder) => builder
.ConfigureServices(services => {
services.AddPlugin(new AutoQueryFeature {
MaxLimit = 1000,
//IncludeTotal = true,
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment