예제 #1
0
 void Connect()
 {
     using (IConnection conn = ConnectionFactory.Build(ConnectionTypes.SqlServer))
     {
         conn.ConnectionString = "";
     }
 }
예제 #2
0
        public DesignData1()
        {
            var p  = new NodeViewModel(250, 250);
            var ps = BuildCircle(250, 250, 200, 6).ToArray();

            _connections = ConnectionFactory.Build(p, 1000, ps);
            Observable.Interval(TimeSpan.FromSeconds(2)).Zip(ps.ToObservable().StartWith(p), (a, b) => b)
            .ObserveOn(App.Current.Dispatcher)
            .Subscribe(p =>
            {
                Points.Add(p);
            });
        }
예제 #3
0
 /// <summary>
 /// protected ctor of BaseDL.
 /// </summary>
 /// <param name="connectionType">Connection Type.</param>
 /// <param name="connectionString">Connection String.</param>
 protected BaseDL(ConnectionTypes connectionType, string connectionString)
 {
     try
     {
         conn_name = "from_driver";
         this.Conn = ConnectionFactory.Build(connectionType, connectionString);
         conn_type = this.Conn.ConnectionType;
         conn_str  = this.Conn.ConnectionString;
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #4
0
        /// <summary>
        /// protected ctor of BaseDL.
        /// </summary>
        /// <param name="connectionName">connection property name</param>
        protected BaseDL(string connectionName)
        {
            try
            {
                conn_name   = connectionName;
                db_property = FreeConfiguration.BuildProperty(conn_name);

                this.Conn = ConnectionFactory.Build(db_property);

                conn_type = this.Conn.ConnectionType;
                //ConnectionTypeBuilder.GetConnectionType(db_property.ConnType);
            }
            catch (Exception)
            {
                throw;
            }
        }