Skip to content

Instantly share code, notes, and snippets.

@Layoric
Last active June 2, 2021 06:12
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 Layoric/afdbf2f8dbc6dbad40ab20756569cfbb to your computer and use it in GitHub Desktop.
Save Layoric/afdbf2f8dbc6dbad40ab20756569cfbb to your computer and use it in GitHub Desktop.
Register AutoQuery Plugin
// Connect your database
container.AddSingleton<IDbConnectionFactory>(c =>
new OrmLiteConnectionFactory(MapProjectPath("~/northwind.sqlite"), SqliteDialect.Provider));
// Configure AutoQuery to Generate CRUD services
Plugins.Add(new AutoQueryFeature {
MaxLimit = 1000,
GenerateCrudServices = new GenerateCrudServices {
AutoRegister = true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment