@ -1,19 +1,18 @@
using System.Collections.Immutable ;
using Microsoft.Extensions.Configuration ;
namespace Connected.Configuration
{
internal class DatabaseConfiguration : IDatabaseConfiguration
{
private List < string > _shards ;
private readonly List < string > _shards ;
public DatabaseConfiguration ( )
public DatabaseConfiguration ( IConfiguration configuration )
{
/ *
* TODO : read from config
* /
DefaultConnectionString = "server=PIT-ZBOOK\\sqlexpress; database=connected; trusted_connection=true;TrustServerCertificate=True;multiple active result sets=true" ;
DefaultConnectionString = "" ;
_shards = new ( ) ;
configuration . Bind ( this ) ;
configuration . Bind ( "shards" , _shards ) ;
}
public string? DefaultConnectionString { get ; init ; }