コード例 #1
0
 public MiaoSiBookInformationService(IUnityContainer container)
 {
     this.container                = container;
     this.eventAggregator          = container.Resolve <IEventAggregator>();
     this.serverIp                 = "sqlserver.syslab.org"; this.serverPort = "0"; this.serverUsername = "******"; this.serverPassword = "******";
     this.databaseConnectionString = "";
     this.databaseConnectionString = generateDatabaseConnectionString();
     this.database                 = new MiaoSiBookDatabase(databaseConnectionString);
 }
コード例 #2
0
        String generateDatabaseConnectionString()
        {
            string ip       = this.ServerIp;
            string username = this.ServerUsername;
            string password = this.ServerPassword;
            //Data Source=192.168.28.129;Initial Catalog=Dblibrary;Persist Security Info=True;User ID=sa;Password=19831122
            String conString = "Data Source=" + ip + ";Initial Catalog=Dblibrary;Persist Security Info=True;User ID=" + username + ";Password=" + password;

            this.database = new MiaoSiBookDatabase(conString);
            return(conString);
        }