Beispiel #1
0
        static void testMajorController()
        {
            var connection = new Connection("localhost", "sqlexpress", "EdDb");
            var majorsCtrl = new MajorsController(connection);

            var MajorARTC = majorsCtrl.GetByCode("ARTC");

            //var newMajor = new Major(9)
            //{
            //    Code = "ARTC",
            //    Description = "Ceramics",
            //    MinSAT = 1237,

            //};
            //var success1 = majorsCtrl.Insert(newMajor);


            ////var majors3 = majorsCtrl.Delete(8);

            //var majors = majorsCtrl.GetAll();
            //var majors1 = majorsCtrl.GetByPk(3);
            //var majors2 =  majorsCtrl.GetByPk(9);
        }
Beispiel #2
0
        static void TestMajorsController()
        {
            var connection = new Connection("localhost", "sqlexpress", "EdDb");
            var majorsCtrl = new MajorsController(connection);

            var MajorUWBW = majorsCtrl.GetByCode("UWBW");

            //var newMajor = new Major {
            //    Code = "UWBW",
            //    Description = "Underwater Basket Weaving",
            //    MinSat = 1600
            //};
            //var success1 = majorsCtrl.Insert(newMajor);

            //var major = majorsCtrl.GetByPK(10);
            //major.Description = "A change by Greg";
            //var success = majorsCtrl.Update(major);

            //var success = majorsCtrl.Delete(9);

            //var majors = majorsCtrl.GetAll();
            //var major1 = majorsCtrl.GetByPK(1);
            //var major0 = majorsCtrl.GetByPK(0);
        }