예제 #1
0
        /// <summary>
        /// Instantiates mProps and mOldProps as new Props objects.
        /// Instantiates mbdReadable and mdbWriteable as new DB objects.
        /// </summary>
        protected override void SetUp()
        {
            mProps    = new ProductProps();
            mOldProps = new ProductProps();

            if (this.mConnectionString == "")
            {
                mdbReadable  = new ProductDB();
                mdbWriteable = new ProductDB();
            }

            else
            {
                mdbReadable  = new ProductDB(this.mConnectionString);
                mdbWriteable = new ProductDB(this.mConnectionString);
            }
        }
예제 #2
0
        /// <summary>
        /// Deletes the product
        /// </summary>
        public static void Delete(ProductProps p)
        {
            ProductDB db = new ProductDB();

            db.Delete(p);
        }