Пример #1
0
        public override void OnInitialized()
        {
            var sqlBuilder = new SqlConnectionStringBuilder
            {
                DataSource         = Configuration.Host,
                InitialCatalog     = Configuration.InstanceName,
                IntegratedSecurity = false,
                UserID             = Configuration.Username,
                Password           = Configuration.Password
            };

            var entityBuilder = new EntityConnectionStringBuilder
            {
                Provider = "System.Data.SqlClient",
                ProviderConnectionString = sqlBuilder.ToString(),
                Metadata =
                    @"res://*/Database.EntityFramework.KonfDBModel.csdl|res://*/Database.EntityFramework.KonfDBModel.ssdl|res://*/Database.EntityFramework.KonfDBModel.msl"
            };

            _configurationStore = new ConfigurationDataStore(entityBuilder.ToString());
        }
Пример #2
0
        public override void OnInitialized()
        {
            var sqlBuilder = new SqlConnectionStringBuilder
            {
                DataSource = Configuration.Host,
                InitialCatalog = Configuration.InstanceName,
                IntegratedSecurity = false,
                UserID = Configuration.Username,
                Password = Configuration.Password
            };

            var entityBuilder = new EntityConnectionStringBuilder
            {
                Provider = "System.Data.SqlClient",
                ProviderConnectionString = sqlBuilder.ToString(),
                Metadata =
                    @"res://*/Database.EntityFramework.KonfDBModel.csdl|res://*/Database.EntityFramework.KonfDBModel.ssdl|res://*/Database.EntityFramework.KonfDBModel.msl"
            };

            _configurationStore = new ConfigurationDataStore(entityBuilder.ToString());
        }