//private MittenteServer _serverSender; public AscoltatoreDispositivi(string connectionString, string dbConnectionString) { _connectionString = connectionString; HubClient = EventHubClient.CreateFromConnectionString(connectionString, EndPointServer); _serverSender = new MittenteServer(_connectionString); DbContextOptionsBuilder <BadgeContext> option = new DbContextOptionsBuilder <BadgeContext>(new DbContextOptions <BadgeContext>()); option.UseSqlServer(dbConnectionString); context = new BadgeContext(option.Options); }
//private MittenteServer _serverSender; public AscoltatoreDispositivi(string connectionString) { _connectionString = connectionString; HubClient = EventHubClient.CreateFromConnectionString(connectionString, EndPointServer); _serverSender = new MittenteServer(_connectionString); DbContextOptionsBuilder <BadgeContext> option = new DbContextOptionsBuilder <BadgeContext>(new DbContextOptions <BadgeContext>()); option.UseSqlServer("Server=(localdb)\\mssqllocaldb;Database=Badge;Trusted_Connection=True;MultipleActiveResultSets=true"); context = new BadgeContext(option.Options); }