Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Last active June 30, 2021 07:13
Show Gist options
  • Save gistlyn/20af4d47022946df2e470060022608fd to your computer and use it in GitHub Desktop.
Save gistlyn/20af4d47022946df2e470060022608fd to your computer and use it in GitHub Desktop.
supported-dbs
public class AppHost : AppHostBase
{
public AppHost() : base("Web",typeof(MyServices).Assembly){}
public override void Configure(Container container)
{
var connectionString =
"Server=127.0.0.1;Port=5432;" +
"Database=host;User Id=user;" +
"Password=myPassword;";
container.Register<IDbConnectionFactory>(
new OrmLiteConnectionFactory(
connectionString,
PostgreSqlDialect.Provider));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment