Esempio n. 1
0
        public void SetUp()
        {
            IDbProvider dbProvider = DbProviderFactory.GetDbProvider("SqlServer-1.1");
            dbProvider.ConnectionString =
                "Server=(local);Integrated Security=no;User ID=springqa;PWD=springqa;initial catalog=SpringAir;";
            dao = new AircraftDao();
            dao.DbProvider = dbProvider;
            
            /*
			ReflectiveDbConnectionFactory connectionfactory = new ReflectiveDbConnectionFactory();
			connectionfactory.ConnectionType = typeof (SqlConnection);
			connectionfactory.ConnectionString =
				"Server=(local)\\Spring;Integrated Security=no;User ID=sa;PWD=spring;initial catalog=SpringAir;";

            dao = new AircraftDao();
			dao.ConnectionFactory = connectionfactory;
			dao.CommandType = typeof (SqlCommand);
            dao.AircraftMapper = new AircraftMapper();
             */
        }
        public void SetUp()
        {
            IDbProvider dbProvider = DbProviderFactory.GetDbProvider("SqlServer-1.1");

            dbProvider.ConnectionString =
                "Server=(local);Integrated Security=no;User ID=springqa;PWD=springqa;initial catalog=SpringAir;";
            dao            = new AircraftDao();
            dao.DbProvider = dbProvider;

            /*
             *          ReflectiveDbConnectionFactory connectionfactory = new ReflectiveDbConnectionFactory();
             *          connectionfactory.ConnectionType = typeof (SqlConnection);
             *          connectionfactory.ConnectionString =
             *                  "Server=(local)\\Spring;Integrated Security=no;User ID=sa;PWD=spring;initial catalog=SpringAir;";
             *
             * dao = new AircraftDao();
             *          dao.ConnectionFactory = connectionfactory;
             *          dao.CommandType = typeof (SqlCommand);
             * dao.AircraftMapper = new AircraftMapper();
             */
        }