Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Last active March 30, 2021 09:39
Show Gist options
  • Save gistlyn/464a80c15cb3af4f41db7810082dc00c to your computer and use it in GitHub Desktop.
Save gistlyn/464a80c15cb3af4f41db7810082dc00c to your computer and use it in GitHub Desktop.
Configure AutoGen AutoCrud Services
dotnet add package ServiceStack.Server
using ServiceStack;
namespace MyApp
{
public class ConfigureAutoQuery : IConfigureAppHost
{
public void Configure(IAppHost appHost)
{
appHost.Plugins.Add(new AutoQueryFeature {
MaxLimit = 1000,
IncludeTotal = true,
GenerateCrudServices = new GenerateCrudServices {
AutoRegister = true,
//AddDataContractAttributes = false,
}
});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment