Commits (3)
......@@ -3,7 +3,6 @@ using Coscine.Database.Settings;
using Coscine.Database.DataModel;
using Coscine.Configuration;
namespace Coscine.Database
{
public partial class CoscineDB : Model
......@@ -12,17 +11,13 @@ namespace Coscine.Database
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
DatabaseSettingsConfiguration databaseSettingsConfiguration;
if (DatabaseSettingsConfiguration == null)
{
IConfiguration _configuration = new ConsulConfiguration();
databaseSettingsConfiguration = new DatabaseSettingsConfiguration(_configuration);
}
else
{
databaseSettingsConfiguration = DatabaseSettingsConfiguration;
DatabaseSettingsConfiguration = new DatabaseSettingsConfiguration(_configuration);
}
optionsBuilder.UseSqlServer(databaseSettingsConfiguration.ConnectionStrings());
optionsBuilder.UseSqlServer(DatabaseSettingsConfiguration.ConnectionStrings());
}
}
}
......@@ -4,7 +4,7 @@
<RootNamespace>Coscine.Database</RootNamespace>
<AssemblyName>Coscine.Database</AssemblyName>
<TargetFrameworks>net5.0;net461</TargetFrameworks>
<Version>2.7.2</Version>
<Version>2.7.3</Version>
</PropertyGroup>
<PropertyGroup>
<Authors>RWTH Aachen University</Authors>
......