示例#1
0
        private void SelectExistingCountry(tblVehicle vehicle, string country)
        {
            var db2 = new seleniumScrapeEntities();



            // Set the Vehicle Country of Origin FK (in vehicle table)
            vehicle.Vehicle_Type_ID_fk =
                db2.tblVehicleTypeCountries.Where(x => x.Vehicle_Type_Country == country).Select(
                    x => x.Vehicle_Type_Country_ID_pk).SingleOrDefault();

            db2.Dispose();
        }
示例#2
0
        private void SelectExistingGeneralType(tblVehicle vehicle, string generalType)
        {
            var db2 = new seleniumScrapeEntities();



            // Set the Vehicle Country of Origin FK (in vehicle table)
            vehicle.Vehicle_Type_General_id_fk =
                db2.tblVehicleTypeGenerals.Where(x => x.VehicleTypeGeneral == generalType).Select(
                    x => x.VehicleTypeGeneral_pk).SingleOrDefault();

            db2.Dispose();
        }
示例#3
0
        private void SelectExistingDefinedType(tblVehicle vehicle, string definedType)
        {
            var db2 = new seleniumScrapeEntities();



            // Set the Vehicle Country of Origin FK (in vehicle table)
            vehicle.Vehicle_Type_Defined_fk =
                db2.tblVehicleTypeDefineds.Where(x => x.VehicleTypeDefined == definedType).Select(
                    x => x.VehicleTypeDefined_id_pk).SingleOrDefault();

            db2.Dispose();
        }