Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
General fixes and tidy-up
Browse files Browse the repository at this point in the history
  • Loading branch information
laingsimon committed Feb 27, 2021
1 parent 4d642e7 commit 5ae55ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion vcdb.MySql/ConnectionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public async Task<DbConnection> CreateConnection()
if (!string.IsNullOrEmpty(options.Database))
{
logger.LogDebug($"Switching to database {options.Database}...");
await connection.ExecuteAsync($"use [{options.Database}]");
await connection.ExecuteAsync($"use `{options.Database}`");
}

return connection;
Expand Down
7 changes: 3 additions & 4 deletions vcdb.SqlServer/SqlServerInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ public class SqlServerInstaller : IServicesInstaller
{
public void RegisterServices(IServiceCollection services, DatabaseVersion databaseVersion)
{
services.AddSingleton<IConnectionFactory, ConnectionFactory>();
services.InNamespace<SqlObjectNameHelper>().AddAsSingleton();
services.InNamespace<SqlServerCheckConstraintRepository>().AddAsSingleton();
services.InNamespace<SqlServerCheckConstraintScriptBuilder>().AddAsSingleton();
services.InNamespace<SqlServerDatabaseDetailsProvider>().AddAsSingleton();
services.InNamespace<SqlServerDatabaseRepository>().AddAsSingleton();
services.InNamespace<SqlServerDatabaseScriptBuilder>().AddAsSingleton();

ObjectName.Converter = new ObjectNameConverter(
delimiter: ".",
Expand Down

0 comments on commit 5ae55ee

Please sign in to comment.