public Sqlite(OrmLiteConnectionFactory _fac)
 {
     fac     = _fac;
     rdbm    = new Rdbms();
     rdbm.Db = new List <DataBases>();
     rdbm.Db.Add(new DataBases());
 }
예제 #2
0
        public void CreateRdbms(RdbmsDto rdbmsDto)
        {
            // Todo: 验证 DB 是否能链接

            var rdbms = new Rdbms(rdbmsDto.Name, rdbmsDto.Description, rdbmsDto.Server, rdbmsDto.Catalog,
                                  rdbmsDto.UserId, rdbmsDto.Password, rdbmsDto.ReadOnly, rdbmsDto.Provider);

            this._rdbmsRepository.Add(rdbms);
        }
예제 #3
0
        /// <summary>
        /// Register
        /// </summary>
        public static void Register(string connectionString)
        {
            Dependencies.RegisterService(
                typeof(IConnectionStringBuilder),
                typeof(OracleConnectionStringBuilder));

            Dependencies.TryRegisterService(
                typeof(IRdbmsConnectionDialog),
                typeof(Gloson.UI.Dialogs.CommandLine.RdbmsConnectionDialog));

            Rdbms.Register(ConnectionType(), connectionString);
        }