C#: Update record using EF
Update record in database using entity framework ... Показать код
Храните, отслеживайте и делитесь с друзьями вашими сниппетами
Update record in database using entity framework ... Показать код
try { using (var context = new myEntities()) { var document = context.ORDERS.Single(parameter => parameter.ID_ORDER == idOrder); document.ORDER_STATUS = status; context.SaveChanges(); } } catch (Exception ex) { Logger.TraceError(ex.Message); }
Vehicles database, two tables with vehicle's models and its marks ... Показать код
CREATE TABLE IF NOT EXISTS `list_vehicle_marks` ( `id` int(11) NOT NULL AUTO_INCREMENT, `value` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `mark` (`value`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 AUTO_INCREMENT=128 ; INSERT INTO `list_vehicle_marks` (`id`, `value`) VALUES (114, 'ZX'), (113, 'Xin Kai'), (112, 'Wiesmann'), (111, 'Wartburg'), (110, 'Volvo'), (109, 'Volkswagen'), (108, 'Vector'), (107, 'TVR'), (106, 'Trabant'), (105, 'Toyota'), (104, 'Tianye'), (103, 'Tianma'), (102, 'Tatra'), (101, 'Suzuki'), (100, 'Subaru'), (99, 'SsangYong'), (98, 'Spyker'), (97, 'Smart'), (96, 'Skoda'), (95, 'ShuangHuan'), (94, 'SEAT'), (93, 'Scion'), (92, 'Saturn'), (91, 'Saleen'), (90, 'Saab'), (89, 'Rover'), (88, 'Rolls-Royce'), (87, 'Renault'), (86, 'PUCH'), (85, 'Proton'), (84, 'Porsche'), (83, 'Pontiac'), (82, 'Plymouth'), (81, 'Peugeot'), (80, 'Pagani'), (79, 'Opel'), (78, 'Oldsmobile'), (77, 'Nissan'), (76, 'Morgan'), (75, 'Mitsuoka'), (74, 'Mitsubishi'), (73, 'Mini'), (72, 'Microcar'), (71, 'MG'), (70, 'Metrocab'), (69, 'Mercury'), (68, 'Mercedes-Benz'), (67, 'Mazda'), (66, 'Maybach'), (65, 'Maserati'), (64, 'Maruti'), (63, 'Mahindra'), (62, 'Lotus'), (61, 'Lincoln'), (60, 'Lifan'), (59, 'Lexus'), (58, 'Landwind'), (57, 'Land Rover'), (56, 'Lancia'), (55, 'Lamborghini'), (54, 'Koenigsegg'), (53, 'Kia'), (52, 'Jeep'), (51, 'Jaguar'), (50, 'JAC'), (49, 'Isuzu'), (48, 'Iran Khodro'), (47, 'Infiniti'), (46, 'Hyundai'), (45, 'Hummer'), (44, 'HuangHai'), (43, 'Honda'), (42, 'Hafei'), (41, 'Great Wall'), (40, 'GMC'), (39, 'Geo'), (38, 'Geely'), (37, 'Ford'), (36, 'Fiat'), (35, 'Ferrari'), (34, 'FAW'), (33, 'Eagle'), (32, 'Donkervoort'), (31, 'Doninvest'), (30, 'Dong Feng'), (29, 'Dodge'), (28, 'Derways'), (27, 'Daimler'), (26, 'Daihatsu'), (25, 'Daewoo'), (24, 'Dadi'), (23, 'Dacia'), (22, 'Coggiola'), (21, 'Citroen'), (20, 'Chrysler'), (19, 'Chevrolet'), (18, 'Chery'), (17, 'ChangFeng'), (16, 'Caterham'), (15, 'Cadillac'), (14, 'BYD'), (13, 'Buick'), (12, 'Bugatti'), (11, 'Brilliance'), (10, 'BMW'), (9, 'Bentley'), (8, 'Austin'), (7, 'Audi'), (6, 'Aston Martin'), (5, 'Asia'), (4, 'Aro'), (3, 'Alpina'), (2, 'Alfa Romeo'), (1, 'Acura'); CREATE TABLE IF NOT EXISTS `list_vehicle_models` ( `id` int(11) NOT NULL AUTO_INCREMENT, `mark_id` int(11) DEFAULT NULL COMMENT 'Link to `list_vehicle_marks`.`id`', `value` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `mark_id` (`mark_id`,`value`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1546 ; INSERT INTO `list_vehicle_models` (`id`, `mark_id`, `value`) VALUES (1402, 114, 'Landmark'), (1401, 114, 'GrandTiger'), (1400, 113, 'SUV X3'), (1399, 113, 'SR-V X3'), (1398, 113, 'PICKUP X3'), (1397, 112, 'Roadster'), (1396, 112, 'GT'), (1395, 111, '353'), (1394, 110, 'XC90'), (1393, 110, 'XC70'), (1392, 110, 'V70'), (1391, 110, 'V50'), (1390, 110, 'V40 Kombi'), (1389, 110, 'S90'), (1388, 110, 'S80'), (1387, 110, 'S70'), (1386, 110, 'S60'), (1385, 110, 'S40'), (1384, 110, 'C70'), (1383, 110, 'C30'), (1382, 110, '960'), (1381, 110, '940'), (1380, 110, '850'), (1379, 110, '780 Bertone'), (1378, 110, '760'), (1377, 110, '740'), (1376, 110, '480 E'), (1375, 110, '460 L'), (1374, 110, '440 K'), (1373, 110, '340-360'), (1372, 110, '240'), (1371, 110, '164'), (1370, 109, 'Vento'), (1369, 109, 'Touran'), (1368, 109, 'Touareg'), (1367, 109, 'Tiguan'), (1366, 109, 'Taro'), (1365, 109, 'Sharan'), (1364, 109, 'Scirocco'), (1363, 109, 'Santana'), (1362, 109, 'Polo'), (1361, 109, 'Pointer'), (1360, 109, 'Phaeton'), (1359, 109, 'Passat'), (1358, 109, 'NEW Beetle'), (1357, 109, 'Multivan'), (1356, 109, 'Lupo'), (1355, 109, 'Kaefer'), (1354, 109, 'Jetta'), (1353, 109, 'Golf Plus'), (1352, 109, 'Golf'), (1351, 109, 'Fox'), (1350, 109, 'Eos'), (1349, 109, 'Corrado'), (1348, 109, 'Caddy'), (1347, 109, 'Bora'), (1346, 108, 'W8 Twin Turbo'), (1345, 107, 'Griffith'), (1344, 106, 'P 601'), (1343, 105, 'Yaris Verso'), (1342, 105, 'Yaris'), (1341, 105, 'Wish'), (1340, 105, 'Windom'), (1339, 105, 'Will'), (1338, 105, 'Voxy'), (1337, 105, 'Voltz'), (1336, 105, 'Vitz'), (1335, 105, 'Vista'), (1334, 105, 'Verossa'), (1333, 105, 'Venza'), (1332, 105, 'Vellfire'), (1331, 105, 'Tundra'), (1330, 105, 'Tercel'), (1329, 105, 'Tacoma'), (1328, 105, 'Supra'), (1327, 105, 'Succeed'), (1326, 105, 'Starlet'), (1325, 105, 'Sprinter'), (1324, 105, 'Sparky'), (1323, 105, 'Solara'), (1322, 105, 'Soarer'), (1321, 105, 'Sienta'), (1320, 105, 'Sienna'), (1319, 105, 'Sera'), (1318, 105, 'Sequoia'), (1317, 105, 'Scepter'), (1316, 105, 'Regius Ace'), (1315, 105, 'Regius'), (1314, 105, 'Regius'), (1313, 105, 'Raum'), (1312, 105, 'Ractis'), (1311, 105, 'RAV 4'), (1310, 105, 'Pronard'), (1309, 105, 'Progres'), (1308, 105, 'Probox'), (1307, 105, 'Prius'), (1306, 105, 'Previa'), (1305, 105, 'Premio'), (1304, 105, 'Porte'), (1303, 105, 'Platz'), (1302, 105, 'Picnic'), (1301, 105, 'Passo'), (1300, 105, 'Paseo'), (1299, 105, 'Origin'), (1298, 105, 'Opa'), (1297, 105, 'Noah'), (1296, 105, 'Nadia'), (1295, 105, 'Matrix'), (1294, 105, 'MasterAce'), (1293, 105, 'Mark X'), (1292, 105, 'Mark II'), (1291, 105, 'MR-S'), (1290, 105, 'MR 2'), (1289, 105, 'Lite Ace'), (1288, 105, 'Land Cruiser 80'), (1287, 105, 'Land Cruiser 70'), (1286, 105, 'Land Cruiser 200'), (1285, 105, 'Land Cruiser 100'), (1284, 105, 'Land Cruiser (90) Prado'), (1283, 105, 'Land Cruiser (120) Prado'), (1282, 105, 'Land Cruiser'), (1281, 105, 'Kluger'), (1280, 105, 'Ist'), (1279, 105, 'Ipsum'), (1278, 105, 'ISis'), (1277, 105, 'Hilux Surf'), (1276, 105, 'Hilux Pick Up'), (1275, 105, 'Highlander'), (1274, 105, 'Hiace'), (1273, 105, 'Harrier'), (1272, 105, 'Granvia'), (1271, 105, 'Grand Hiace'), (1270, 105, 'Gaia'), (1269, 105, 'Funcargo'), (1268, 105, 'Fortuner'), (1267, 105, 'FJ Cruiser'), (1266, 105, 'Estima'), (1265, 105, 'Echo'), (1264, 105, 'Duet'), (1263, 105, 'Cynos'), (1262, 105, 'Curren'), (1261, 105, 'Crown Majesta'), (1260, 105, 'Crown Athlete'), (1259, 105, 'Crown'), (1258, 105, 'Crown'), (1257, 105, 'Cresta'), (1256, 105, 'Cressida'), (1255, 105, 'Corsa'), (1254, 105, 'Corona'), (1253, 105, 'Corolla Verso'), (1252, 105, 'Corolla Spacio'), (1251, 105, 'Corolla RunX'), (1250, 105, 'Corolla Rumion'), (1249, 105, 'Corolla Levin'), (1248, 105, 'Corolla Fielder'), (1247, 105, 'Corolla FX'), (1246, 105, 'Corolla Ceres'), (1245, 105, 'Corolla'), (1244, 105, 'Corolla'), (1243, 105, 'Chaser'), (1242, 105, 'Celica'), (1241, 105, 'Cavalier'), (1240, 105, 'Carina ED'), (1239, 105, 'Carina E'), (1238, 105, 'Carina'), (1237, 105, 'Carib'), (1236, 105, 'Camry Solara'), (1235, 105, 'Camry'), (1234, 105, 'Cami'), (1233, 105, 'Caldina'), (1232, 105, 'Brevis'), (1231, 105, 'BB'), (1230, 105, 'Avensis Verso'), (1229, 105, 'Avensis'), (1228, 105, 'Avalon'), (1227, 105, 'Auris'), (1226, 105, 'Aurion'), (1225, 105, 'Aristo'), (1224, 105, 'Altezza'), (1223, 105, 'Alphard'), (1222, 105, 'Allion'), (1221, 105, 'Allex'), (1220, 105, '4runner'), (1219, 104, 'Admiral'), (1218, 103, 'Century'), (1217, 102, 'T613'), (1216, 101, 'XL7'), (1215, 101, 'X-90'), (1214, 101, 'Wagon R+'), (1213, 101, 'Vitara'), (1212, 101, 'Verona'), (1211, 101, 'Swift'), (1210, 101, 'Sidekick'), (1209, 101, 'Samurai'), (1208, 101, 'SX4'), (1207, 101, 'MR Wagon'), (1206, 101, 'Liana'), (1205, 101, 'Kei'), (1204, 101, 'Jimny'), (1203, 101, 'Ignis'), (1202, 101, 'Grand Vitara'), (1201, 101, 'Forenza'), (1200, 101, 'Every Landy'), (1199, 101, 'Every'), (1198, 101, 'Escudo'), (1197, 101, 'Cultus Wagon'), (1196, 101, 'Baleno'), (1195, 101, 'Alto'), (1194, 101, 'Aerio'), (1193, 100, 'XT'), (1192, 100, 'Vivio'), (1191, 100, 'Tribeca'), (1190, 100, 'Traviq'), (1189, 100, 'Stella'), (1188, 100, 'SVX'), (1187, 100, 'R2'), (1186, 100, 'Pleo'), (1185, 100, 'Outback'), (1184, 100, 'Libero'), (1183, 100, 'Leone'), (1182, 100, 'Legacy'), (1181, 100, 'Justy'), (1180, 100, 'Impreza WRX'), (1179, 100, 'Impreza'), (1178, 100, 'Forester'), (1177, 100, 'Baja'), (1176, 99, 'Tager'), (1175, 99, 'Rodius'), (1174, 99, 'Rexton'), (1173, 99, 'Musso'), (1172, 99, 'Kyron'), (1171, 99, 'Korando'), (1170, 99, 'Istana'), (1169, 99, 'Family'), (1168, 99, 'Chairman'), (1167, 99, 'Actyon'), (1166, 98, 'C8'), (1165, 97, 'Roadster'), (1164, 97, 'Fortwo'), (1163, 97, 'Forfour'), (1162, 97, 'Crossblade'), (1161, 96, 'Superb'), (1160, 96, 'Roomster'), (1159, 96, 'Octavia Scout'), (1158, 96, 'Octavia'), (1157, 96, 'Felicia'), (1156, 96, 'Favorit'), (1155, 96, 'Fabia'), (1154, 95, 'Sceo'), (1153, 94, 'Toledo'), (1152, 94, 'Ronda'), (1151, 94, 'Malaga'), (1150, 94, 'Leon'), (1149, 94, 'Ibiza'), (1148, 94, 'Cordoba'), (1147, 94, 'Arosa'), (1146, 94, 'Altea'), (1145, 94, 'Alhambra'), (1144, 93, 'xB'), (1143, 93, 'xA'), (1142, 93, 'tC'), (1141, 92, 'VUE'), (1140, 92, 'SL'), (1139, 92, 'SC'), (1138, 92, 'LS'), (1137, 92, 'ION'), (1136, 91, 'S7'), (1135, 90, '9000'), (1134, 90, '900'), (1133, 90, '99'), (1132, 90, '9-7X'), (1131, 90, '9-5'), (1130, 90, '9-3'), (1129, 90, '9-2X'), (1128, 89, 'Montego'), (1127, 89, 'Mini MK'), (1126, 89, 'Maestro'), (1125, 89, '800'), (1124, 89, '600'), (1123, 89, '400'), (1122, 89, '200'), (1121, 89, '75'), (1120, 89, '45'), (1119, 89, '25'), (1118, 88, 'Silver Spur'), (1117, 88, 'Silver Seraph'), (1116, 88, 'Phantom Drophead Coupe'), (1115, 88, 'Phantom'), (1114, 88, 'Corniche Cabrio'), (1113, 87, 'Vel Satis'), (1112, 87, 'Twingo'), (1111, 87, 'Trafic'), (1110, 87, 'Symbol'), (1109, 87, 'Super 5'), (1108, 87, 'Scenic RX'), (1107, 87, 'Scenic'), (1106, 87, 'Safrane'), (1105, 87, 'Rapid'), (1104, 87, 'Modus'), (1103, 87, 'Megane'), (1102, 87, 'Master'), (1101, 87, 'Logan'), (1100, 87, 'Laguna'), (1099, 87, 'Kangoo Passenger'), (1098, 87, 'Kangoo Express'), (1097, 87, 'Grand Scenic'), (1096, 87, 'Fuego'), (1095, 87, 'Espace'), (1094, 87, 'Clio Symbol'), (1093, 87, 'Clio'), (1092, 87, 'Avantime'), (1091, 87, '25'), (1090, 87, '21'), (1089, 87, '20'), (1088, 87, '19'), (1087, 87, '18'), (1086, 87, '11'), (1085, 87, '9'), (1084, 87, '5'), (1083, 86, 'Pinzgauer'), (1082, 86, 'G-modell'), (1081, 85, 'Persona 400'), (1080, 85, 'Persona 300 Compact'), (1079, 84, 'Cayman'), (1078, 84, 'Cayenne'), (1077, 84, 'Carrera GT'), (1076, 84, 'Boxster'), (1075, 84, '968'), (1074, 84, '944'), (1073, 84, '928'), (1072, 84, '924'), (1071, 84, '911'), (1070, 83, 'Vibe'), (1069, 83, 'Trans Sport'), (1068, 83, 'Sunfire'), (1067, 83, 'Sunbird'), (1066, 83, 'Solstige'), (1065, 83, 'Phoenix'), (1064, 83, 'Grand Prix'), (1063, 83, 'Grand AM'), (1062, 83, 'GTO'), (1061, 83, 'Firebird'), (1060, 83, 'Bonneville'), (1059, 83, 'Aztec'), (1058, 83, '6000'), (1057, 82, 'Voyager'), (1056, 82, 'Sundance'), (1055, 82, 'Prowler'), (1054, 82, 'Neon'), (1053, 82, 'Laser'), (1052, 82, 'Grand Voyager'), (1051, 82, 'Breeze'), (1050, 82, 'Acclaim'), (1049, 81, '4007'), (1048, 81, '1007'), (1047, 81, '807'), (1046, 81, '806'), (1045, 81, '607'), (1044, 81, '605'), (1043, 81, '407'), (1042, 81, '406'), (1041, 81, '405'), (1040, 81, '309'), (1039, 81, '308'), (1038, 81, '307'), (1037, 81, '306'), (1036, 81, '305'), (1035, 81, '207'), (1034, 81, '206'), (1033, 81, '205'), (1032, 81, '107'), (1031, 81, '106'), (1030, 80, 'Zonda C12'), (1029, 79, 'Zafira'), (1028, 79, 'Vita'), (1027, 79, 'Vectra'), (1026, 79, 'Tigra'), (1025, 79, 'Speedster'), (1024, 79, 'Sintra'), (1023, 79, 'Signum'), (1022, 79, 'Senator'), (1021, 79, 'Rekord'), (1020, 79, 'Omega'), (1019, 79, 'Movano'), (1018, 79, 'Monterey'), (1017, 79, 'Meriva'), (1016, 79, 'Manta'), (1015, 79, 'Kadett'), (1014, 79, 'GT'), (1013, 79, 'Frontera'), (1012, 79, 'Corsa OPC'), (1011, 79, 'Corsa'), (1010, 79, 'Commodore'), (1009, 79, 'Combo'), (1008, 79, 'Campo'), (1007, 79, 'Calibra'), (1006, 79, 'Astra OPC'), (1005, 79, 'Astra'), (1004, 79, 'Ascona'), (1003, 79, 'Antara'), (1002, 79, 'Agila'), (1001, 78, 'Silhouette'), (1000, 78, 'Cutlass'), (999, 78, 'Bravada'), (998, 78, 'Aurora'), (997, 78, 'Alero'), (996, 78, 'Achieva'), (995, 77, 'X-Trail'), (994, 77, 'X-Terra'), (993, 77, 'Wingroad'), (992, 77, 'Vanette'), (991, 77, 'Urvan'), (990, 77, 'Titan'), (989, 77, 'Tino'), (988, 77, 'Tiida'), (987, 77, 'Terrano'), (986, 77, 'Teana'), (985, 77, 'Sunny'), (984, 77, 'Stanza'), (983, 77, 'Stagea'), (982, 77, 'Skyline'), (981, 77, 'Silvia'), (980, 77, 'Serena'), (979, 77, 'Sentra'), (978, 77, 'Safari'), (977, 77, 'Rogue'), (976, 77, 'Rasheen'), (975, 77, 'R Nessa'), (974, 77, 'Quest'), (973, 77, 'Qashqai'), (972, 77, 'Pulsar'), (971, 77, 'Primera'), (970, 77, 'Presea'), (969, 77, 'Presage'), (968, 77, 'Prairie'), (967, 77, 'Pick UP'), (966, 77, 'Patrol'), (965, 77, 'Pathfinder'), (964, 77, 'Note'), (963, 77, 'Navara'), (962, 77, 'Murano'), (961, 77, 'Moco'), (960, 77, 'Mistral'), (959, 77, 'Micra'), (958, 77, 'Maxima'), (957, 77, 'March'), (956, 77, 'Lucino'), (955, 77, 'Liberty'), (954, 77, 'Leopard'), (953, 77, 'Laurel'), (952, 77, 'Largo'), (951, 77, 'Lafesta'), (950, 77, 'King Cab'), (949, 77, 'Gloria'), (948, 77, 'GT-R'), (947, 77, 'Fuga'), (946, 77, 'Frontier'), (945, 77, 'Fairlady'), (944, 77, 'Expert'), (943, 77, 'Elgrand'), (942, 77, 'Datsun'), (941, 77, 'Cube'), (940, 77, 'Cima'), (939, 77, 'Cherry'), (938, 77, 'Cefiro'), (937, 77, 'Cedric'), (936, 77, 'Bluebird'), (935, 77, 'Bassara'), (934, 77, 'Avenir'), (933, 77, 'Armada'), (932, 77, 'Altima'), (931, 77, 'Almera Tino'), (930, 77, 'Almera Classic'), (929, 77, 'Almera'), (928, 77, 'AD'), (927, 77, '350Z'), (926, 77, '300 ZX'), (925, 77, '200 SX'), (924, 77, '100 NX'), (923, 76, 'Aero 8'), (922, 75, 'Le-Seyde'), (921, 75, 'Le-Sayde'), (920, 75, 'Galue'), (919, 74, 'i'), (918, 74, 'Town BOX'), (917, 74, 'Starion'), (916, 74, 'Space Wagon'), (915, 74, 'Space Star'), (914, 74, 'Space Runner'), (913, 74, 'Space Gear'), (912, 74, 'Sigma'), (911, 74, 'Sapporo'), (910, 74, 'RVR'), (909, 74, 'Pajero Sport'), (908, 74, 'Pajero'), (907, 74, 'Outlander'), (906, 74, 'Montero Sport'), (905, 74, 'Montero'), (904, 74, 'Mirage'), (903, 74, 'Minica'), (902, 74, 'Libero'), (901, 74, 'Legnum'), (900, 74, 'Lancer Evolution'), (899, 74, 'Lancer Cedia'), (898, 74, 'Lancer'), (897, 74, 'Lancer'), (896, 74, 'L 200'), (895, 74, 'Grandis'), (894, 74, 'Galant'), (893, 74, 'GTO'), (892, 74, 'FTO'), (891, 74, 'Endeavor'), (890, 74, 'Emeraude'), (889, 74, 'Eclipse'), (888, 74, 'EK Wagon'), (887, 74, 'Dion'), (886, 74, 'Dingo'), (885, 74, 'Diamante'), (884, 74, 'Delica'), (883, 74, 'Debonair'), (882, 74, 'Colt'), (881, 74, 'Chariot'), (880, 74, 'Challenger'), (879, 74, 'Carisma'), (878, 74, 'Aspire'), (877, 74, 'Airtrek'), (876, 74, '3000 GT'), (875, 73, 'One'), (874, 73, 'Cooper'), (873, 73, 'Clubman'), (872, 72, 'MC1'), (871, 71, 'ZT'), (870, 71, 'ZR'), (869, 71, 'TF'), (868, 71, 'MGF'), (867, 71, 'MGB'), (866, 70, 'Taxi (II -series)'), (865, 69, 'Villager'), (864, 69, 'Tracer'), (863, 69, 'Topaz'), (862, 69, 'Sable'), (861, 69, 'Mystique'), (860, 69, 'Mountaineer'), (859, 69, 'Montego'), (858, 69, 'Mariner'), (857, 69, 'Grand Marquis'), (856, 69, 'Cougar'), (855, 69, 'Capri'), (854, 68, 'Viano'), (853, 68, 'Vaneo'), (852, 68, 'V-klasse V 280'), (851, 68, 'V-klasse V 230'), (850, 68, 'V-klasse V 220'), (849, 68, 'V-klasse V 200'), (848, 68, 'SLR McLaren'), (847, 68, 'SLK-klasse SLK 55 AMG'), (846, 68, 'SLK-klasse SLK 350'), (845, 68, 'SLK-klasse SLK 320'), (844, 68, 'SLK-klasse SLK 32 AMG'), (843, 68, 'SLK-klasse SLK 280'), (842, 68, 'SLK-klasse SLK 230'), (841, 68, 'SLK-klasse SLK 200'), (840, 68, 'SL-klasse SL 65 AMG'), (839, 68, 'SL-klasse SL 63 AMG'), (838, 68, 'SL-klasse SL 600'), (837, 68, 'SL-klasse SL 55 AMG'), (836, 68, 'SL-klasse SL 500'), (835, 68, 'SL-klasse SL 450'), (834, 68, 'SL-klasse SL 420'), (833, 68, 'SL-klasse SL 380'), (832, 68, 'SL-klasse SL 350'), (831, 68, 'SL-klasse SL 320'), (830, 68, 'SL-klasse SL 300'), (829, 68, 'SL-klasse SL 280'), (828, 68, 'S-klasse S 65 AMG'), (827, 68, 'S-klasse S 600'), (826, 68, 'S-klasse S 560'), (825, 68, 'S-klasse S 550'), (824, 68, 'S-klasse S 55 AMG'), (823, 68, 'S-klasse S 500'), (822, 68, 'S-klasse S 450'), (821, 68, 'S-klasse S 430'), (820, 68, 'S-klasse S 420'), (819, 68, 'S-klasse S 400'), (818, 68, 'S-klasse S 380'), (817, 68, 'S-klasse S 350'), (816, 68, 'S-klasse S 320'), (815, 68, 'S-klasse S 300'), (814, 68, 'S-klasse S 280'), (813, 68, 'S-klasse S 260'), (812, 68, 'R-klasse R 500'), (811, 68, 'R-klasse R 350'), (810, 68, 'R-klasse R 320'), (809, 68, 'R-klasse'), (808, 68, 'Pullmann'), (807, 68, 'M-klasse ML 63 AMG'), (806, 68, 'M-klasse ML 55 AMG'), (805, 68, 'M-klasse ML 500'), (804, 68, 'M-klasse ML 430'), (803, 68, 'M-klasse ML 400'), (802, 68, 'M-klasse ML 350'), (801, 68, 'M-klasse ML 320'), (800, 68, 'M-klasse ML 280'), (799, 68, 'M-klasse ML 270'), (798, 68, 'M-klasse ML 230'), (797, 68, 'GL-klasse GL 550'), (796, 68, 'GL-klasse GL 500'), (795, 68, 'GL-klasse GL 450'), (794, 68, 'GL-klasse GL 420'), (793, 68, 'GL-klasse GL 320'), (792, 68, 'G-Klasse G 55 AMG'), (791, 68, 'G-Klasse G 500'), (790, 68, 'G-Klasse G 400'), (789, 68, 'G-Klasse G 350'), (788, 68, 'G-Klasse G 320'), (787, 68, 'G-Klasse G 300'), (786, 68, 'G-Klasse G 290'), (785, 68, 'G-Klasse G 280'), (784, 68, 'G-Klasse G 270'), (783, 68, 'G-Klasse G 250'), (782, 68, 'G-Klasse G 230'), (781, 68, 'E-klasse E 63 AMG'), (780, 68, 'E-klasse E 55 AMG'), (779, 68, 'E-klasse E 500'), (778, 68, 'E-klasse E 50 AMG'), (777, 68, 'E-klasse E 430'), (776, 68, 'E-klasse E 420'), (775, 68, 'E-klasse E 400'), (774, 68, 'E-klasse E 350'), (773, 68, 'E-klasse E 320'), (772, 68, 'E-klasse E 300'), (771, 68, 'E-klasse E 290'), (770, 68, 'E-klasse E 280'), (769, 68, 'E-klasse E 270'), (768, 68, 'E-klasse E 250'), (767, 68, 'E-klasse E 240'), (766, 68, 'E-klasse E 230'), (765, 68, 'E-klasse E 220'), (764, 68, 'E-klasse E 200'), (763, 68, 'CLS-klasse CLS 63 AMG'), (762, 68, 'CLS-klasse CLS 55 AMG'), (761, 68, 'CLS-klasse CLS 500'), (760, 68, 'CLS-klasse CLS 350'), (759, 68, 'CLS-klasse CLS 320'), (758, 68, 'CLK-klasse CLK 63 AMG'), (757, 68, 'CLK-klasse CLK 55 AMG'), (756, 68, 'CLK-klasse CLK 500'), (755, 68, 'CLK-klasse CLK 430'), (754, 68, 'CLK-klasse CLK 350'), (753, 68, 'CLK-klasse CLK 320'), (752, 68, 'CLK-klasse CLK 270'), (751, 68, 'CLK-klasse CLK 240'), (750, 68, 'CLK-klasse CLK 230'), (749, 68, 'CLK-klasse CLK 220'), (748, 68, 'CLK-klasse CLK 200'), (747, 68, 'CLC-klasse CLC 220 CDI'), (746, 68, 'CL-Klasse CL 65 AMG'), (745, 68, 'CL-Klasse CL 63 AMG'), (744, 68, 'CL-Klasse CL 600'), (743, 68, 'CL-Klasse CL 55 AMG'), (742, 68, 'CL-Klasse CL 500'), (741, 68, 'CL-Klasse CL 420'), (740, 68, 'C-klasse C 63 AMG'), (739, 68, 'C-klasse C 55 AMG'), (738, 68, 'C-klasse C 36 AMG'), (737, 68, 'C-klasse C 350'), (736, 68, 'C-klasse C 320'), (735, 68, 'C-klasse C 32 AMG'), (734, 68, 'C-klasse C 280'), (733, 68, 'C-klasse C 270'), (732, 68, 'C-klasse C 250'), (731, 68, 'C-klasse C 240'), (730, 68, 'C-klasse C 230'), (729, 68, 'C-klasse C 220'), (728, 68, 'C-klasse C 200'), (727, 68, 'C-klasse C 180'), (726, 68, 'B-klasse B 200'), (725, 68, 'B-klasse B 180'), (724, 68, 'B-klasse B 170'), (723, 68, 'A-klasse A 210'), (722, 68, 'A-klasse A 200'), (721, 68, 'A-klasse A 190'), (720, 68, 'A-klasse A 180'), (719, 68, 'A-klasse A 170'), (718, 68, 'A-klasse A 160'), (717, 68, 'A-klasse A 150'), (716, 68, 'A-klasse A 140'), (715, 68, '500'), (714, 68, '300'), (713, 68, '280'), (712, 68, '260'), (711, 68, '250'), (710, 68, '240'), (709, 68, '230'), (708, 68, '220'), (707, 68, '200'), (706, 68, '190'), (705, 68, '/8'), (704, 68, ' T-mod.'), (703, 68, ' Coupe'), (702, 68, ' Cabrio'), (701, 67, 'Xedos 9'), (700, 67, 'Xedos 6'), (699, 67, 'Verisa'), (698, 67, 'Tribute'), (697, 67, 'Rx-8'), (696, 67, 'Roadster'), (695, 67, 'RX 7'), (694, 67, 'Protege'), (693, 67, 'Premacy'), (692, 67, 'Mx-6'), (691, 67, 'Mx-5'), (690, 67, 'Mx-3'), (689, 67, 'Millenia'), (688, 67, 'Mazda 6 MPS'), (687, 67, 'Mazda 6'), (686, 67, 'Mazda 5'), (685, 67, 'Mazda 3 MPS'), (684, 67, 'Mazda 3'), (683, 67, 'Mazda 2'), (682, 67, 'MPV'), (681, 67, 'Luce'), (680, 67, 'Levante'), (679, 67, 'Lantis'), (678, 67, 'Familia'), (677, 67, 'Eunos Cosmo'), (676, 67, 'Eunos 500'), (675, 67, 'E 2000,2200 Bus'), (674, 67, 'Demio'), (673, 67, 'Carol'), (672, 67, 'Capella'), (671, 67, 'CX-9'), (670, 67, 'CX-7'), (669, 67, 'Bongo'), (668, 67, 'BT-50'), (667, 67, 'B-serie'), (666, 67, 'Az-wagon'), (665, 67, 'Axela'), (664, 67, 'Atenza'), (663, 67, '929'), (662, 67, '626'), (661, 67, '323'), (660, 67, '121'), (659, 66, 'Maybach 57 и Maybach 62'), (658, 66, 'Maybach 57 S и Maybach 62 S'), (657, 65, 'Spyder'), (656, 65, 'Quattroporte'), (655, 65, 'GranTurismo'), (654, 65, 'GranSport'), (653, 65, 'Coupe'), (652, 65, 'Biturbo'), (651, 65, '4300 GT Coupe'), (650, 65, '3200 GT'), (649, 65, '228'), (648, 64, 'Alto'), (647, 63, 'Marshal'), (646, 62, 'Super 7'), (645, 62, 'Exige'), (644, 62, 'Elise'), (643, 61, 'Zephyr'), (642, 61, 'Town Car'), (641, 61, 'Navigator'), (640, 61, 'Mark LT'), (639, 61, 'Mark'), (638, 61, 'MKZ'), (637, 61, 'MKX'), (636, 61, 'LS'), (635, 61, 'Continental'), (634, 61, 'Aviator'), (633, 60, 'Breez (520)'), (632, 59, 'SC 430'), (631, 59, 'SC 400'), (630, 59, 'SC 300'), (629, 59, 'RX 400h'), (628, 59, 'RX 350'), (627, 59, 'RX 330'), (626, 59, 'RX 300'), (625, 59, 'LX 570'), (624, 59, 'LX 470'), (623, 59, 'LX 450'), (622, 59, 'LS 600'), (621, 59, 'LS 460'), (620, 59, 'LS 430'), (619, 59, 'LS 400'), (618, 59, 'IS-F'), (617, 59, 'IS 350'), (616, 59, 'IS 300'), (615, 59, 'IS 250'), (614, 59, 'IS 200'), (613, 59, 'GX'), (612, 59, 'GS 460'), (611, 59, 'GS 450h'), (610, 59, 'GS 430'), (609, 59, 'GS 400'), (608, 59, 'GS 350'), (607, 59, 'GS 300'), (606, 59, 'ES 350'), (605, 59, 'ES 330'), (604, 59, 'ES 300'), (603, 58, 'SUV'), (602, 58, 'Double Gate'), (601, 57, 'Range Rover Sport'), (600, 57, 'Range Rover'), (599, 57, 'Land Rover'), (598, 57, 'Freelander'), (597, 57, 'Discovery'), (596, 57, 'Defender'), (595, 57, '90/110'), (594, 56, 'Y'), (593, 56, 'Thesis'), (592, 56, 'Thema'), (591, 56, 'Phedra'), (590, 56, 'Lybra'), (589, 56, 'Kappa'), (588, 56, 'Delta'), (587, 56, 'Dedra'), (586, 56, 'Beta'), (585, 55, 'Murcielago'), (584, 55, 'Gallardo'), (583, 55, 'Espada'), (582, 55, 'Diablo'), (581, 54, 'CC'), (580, 53, 'Visto'), (579, 53, 'Sportage'), (578, 53, 'Spectra'), (577, 53, 'Sorento'), (576, 53, 'Shuma'), (575, 53, 'Sephia'), (574, 53, 'Sedona'), (573, 53, 'Rio'), (572, 53, 'Retona'), (571, 53, 'Pride'), (570, 53, 'Pregio'), (569, 53, 'Potentia'), (568, 53, 'Picanto'), (567, 53, 'Optima'), (566, 53, 'Opirus'), (565, 53, 'Magentis'), (564, 53, 'Joice'), (563, 53, 'Clarus'), (562, 53, 'Cerato'), (561, 53, 'Cee\'d'), (560, 53, 'Carnival'), (559, 53, 'Carens'), (558, 53, 'Capital'), (557, 53, 'Borrego'), (556, 53, 'Besta'), (555, 53, 'Avella'), (554, 52, 'Wrangler'), (553, 52, 'Patriot'), (552, 52, 'Liberty'), (551, 52, 'Grand Cherokee'), (550, 52, 'Compass'), (549, 52, 'Commander'), (548, 52, 'Cherokee'), (547, 52, 'CJ5 - CJ8'), (546, 51, 'XKR'), (545, 51, 'XK 8'), (544, 51, 'XJSc Convertible'), (543, 51, 'XJS Coupe'), (542, 51, 'XJR'), (541, 51, 'XJ'), (540, 51, 'XF'), (539, 51, 'X-type'), (538, 51, 'S-type'), (537, 51, 'E-type'), (536, 50, 'Rein'), (535, 50, 'Refine'), (534, 49, 'Wizard'), (533, 49, 'VehiCross'), (532, 49, 'Trooper'), (531, 49, 'Rodeo'), (530, 49, 'Impulse'), (529, 49, 'Gemini'), (528, 49, 'Bighorn'), (527, 49, 'Axiom'), (526, 49, 'Aska'), (525, 49, 'Ascender'), (524, 48, 'Samand'), (523, 47, 'QX56'), (522, 47, 'QX4'), (521, 47, 'Q45'), (520, 47, 'M45'), (519, 47, 'M35'), (518, 47, 'J30'), (517, 47, 'I35'), (516, 47, 'I30'), (515, 47, 'G37'), (514, 47, 'G35'), (513, 47, 'FX 50'), (512, 47, 'FX 45'), (511, 47, 'FX 35'), (510, 47, 'EX'), (509, 46, 'XG'), (508, 46, 'Verna'), (507, 46, 'Veracruz'), (506, 46, 'Tuscani'), (505, 46, 'Tucson'), (504, 46, 'Trajet'), (503, 46, 'Tiburon'), (502, 46, 'Terracan'), (501, 46, 'Sonata'), (500, 46, 'Santamo'), (499, 46, 'Santa FE'), (498, 46, 'S-Coupe'), (497, 46, 'Pony'), (496, 46, 'NF'), (495, 46, 'Matrix'), (494, 46, 'Marcia'), (493, 46, 'Lavita'), (492, 46, 'H100'), (491, 46, 'H-1 Starex'), (490, 46, 'Grandeur'), (489, 46, 'Getz'), (488, 46, 'Galloper'), (487, 46, 'Elantra'), (486, 46, 'Coupe'), (485, 46, 'Atos'), (484, 46, 'Accent'), (483, 45, 'Hummer H3'), (482, 45, 'Hummer H2'), (481, 45, 'Hummer H1'), (480, 45, 'Hummer'), (479, 44, 'Antelope'), (478, 43, 'Z'), (477, 43, 'Vigor'), (476, 43, 'Vamos'), (475, 43, 'Torneo'), (474, 43, 'Stream'), (473, 43, 'Stepwgn'), (472, 43, 'Sm-x'), (471, 43, 'Shuttle'), (470, 43, 'Saber'), (469, 43, 'S2000'), (468, 43, 'Ridgeline'), (467, 43, 'Rafaga'), (466, 43, 'Prelude'), (465, 43, 'Pilot'), (464, 43, 'Passport'), (463, 43, 'Partner'), (462, 43, 'Orthia'), (461, 43, 'Odyssey'), (460, 43, 'NSX'), (459, 43, 'Mobilio'), (458, 43, 'Logo'), (457, 43, 'Life'), (456, 43, 'Legend'), (455, 43, 'Jazz'), (454, 43, 'Integra'), (453, 43, 'Inspire'), (452, 43, 'Insight'), (451, 43, 'Hr-v'), (450, 43, 'Fit Aria'), (449, 43, 'FR-V'), (448, 43, 'FIT'), (447, 43, 'Element'), (446, 43, 'Edix'), (445, 43, 'Domani'), (444, 43, 'Concerto'), (443, 43, 'Civic Shuttle'), (442, 43, 'Civic'), (441, 43, 'City'), (440, 43, 'Capa'), (439, 43, 'CRX'), (438, 43, 'CR-V'), (437, 43, 'Avancier'), (436, 43, 'Airwave'), (435, 43, 'Accord'), (434, 42, 'Simbo'), (433, 42, 'Princip'), (432, 42, 'Brio'), (431, 41, 'Wingle'), (430, 41, 'Socool'), (429, 41, 'Sailor'), (428, 41, 'Safe'), (427, 41, 'SUV'), (426, 41, 'Hover'), (425, 41, 'Deer'), (424, 40, 'suburban'), (423, 40, 'Yukon'), (422, 40, 'Sonoma'), (421, 40, 'Sierra'), (420, 40, 'Savana'), (419, 40, 'Safari'), (418, 40, 'Jimmy'), (417, 40, 'Envoy'), (416, 40, 'Acadia'), (415, 39, 'Tracker'), (414, 39, 'Storm'), (413, 39, 'Prizm'), (412, 39, 'Metro'), (411, 38, 'Otaka'), (410, 38, 'MK'), (409, 37, 'Windstar'), (408, 37, 'Tourneo Connect'), (407, 37, 'Thunderbird'), (406, 37, 'Tempo'), (405, 37, 'Taurus'), (404, 37, 'Taunus'), (403, 37, 'Sierra'), (402, 37, 'Shelby'), (401, 37, 'Scorpio'), (400, 37, 'S-MAX'), (399, 37, 'Ranger'), (398, 37, 'Puma'), (397, 37, 'Probe'), (396, 37, 'Orion'), (395, 37, 'Mustang'), (394, 37, 'Mondeo'), (393, 37, 'Maverick'), (392, 37, 'Kuga'), (391, 37, 'KA'), (390, 37, 'Granada (USA)'), (389, 37, 'Granada'), (388, 37, 'Galaxy'), (387, 37, 'GT'), (386, 37, 'Fusion (USA)'), (385, 37, 'Fusion'), (384, 37, 'Freestyle'), (383, 37, 'Focus ST'), (382, 37, 'Focus'), (381, 37, 'Five Hundred'), (380, 37, 'Fiesta ST'), (379, 37, 'Fiesta'), (378, 37, 'F-150'), (377, 37, 'Explorer'), (376, 37, 'Expedition'), (375, 37, 'Excursion'), (374, 37, 'Escort'), (373, 37, 'Escape'), (372, 37, 'Edge'), (371, 37, 'Econoline'), (370, 37, 'Crown Victoria'), (369, 37, 'Cougar'), (368, 37, 'Contour'), (367, 37, 'Capri'), (366, 37, 'C-MAX'), (365, 37, 'Bronco'), (364, 37, 'Aerostar'), (363, 36, 'X 1/9'), (362, 36, 'Ulysse'), (361, 36, 'UNO'), (360, 36, 'Tipo'), (359, 36, 'Tempra'), (358, 36, 'Stilo'), (357, 36, 'Seicento'), (356, 36, 'Sedici'), (355, 36, 'Ritmo'), (354, 36, 'Regata'), (353, 36, 'Punto'), (352, 36, 'Panda'), (351, 36, 'Palio'), (350, 36, 'New 500'), (349, 36, 'Multipla'), (348, 36, 'Marea'), (347, 36, 'Fiorino'), (346, 36, 'Doblo'), (345, 36, 'Croma'), (344, 36, 'Coupe'), (343, 36, 'Cinquecento'), (342, 36, 'Bravo'), (341, 36, 'Brava'), (340, 36, 'Barchetta'), (339, 36, 'Albea'), (338, 36, '131'), (337, 35, 'Testarossa'), (336, 35, 'Mondial'), (335, 35, 'Maranello'), (334, 35, 'F355'), (333, 35, 'Enzo'), (332, 35, 'California'), (331, 35, '612 Scaglietti'), (330, 35, '599'), (329, 35, '430'), (328, 35, '360'), (327, 34, 'Vita'), (326, 34, 'Jinn'), (325, 34, 'Admiral'), (324, 33, 'Vision'), (323, 33, 'Talon'), (322, 32, 'D8'), (321, 31, 'Orion'), (320, 31, 'Kondor'), (319, 31, 'Assol'), (318, 30, 'MPV'), (317, 29, 'Viper'), (316, 29, 'Stratus'), (315, 29, 'Stealth'), (314, 29, 'Spirit'), (313, 29, 'Shadow'), (312, 29, 'Ramcharger'), (311, 29, 'RAM'), (310, 29, 'Nitro'), (309, 29, 'Neon'), (308, 29, 'Magnum'), (307, 29, 'Intrepid'), (306, 29, 'Grand Caravan'), (305, 29, 'Durango'), (304, 29, 'Dakota'), (303, 29, 'Charger'), (302, 29, 'Challenger'), (301, 29, 'Caravan'), (300, 29, 'Caliber'), (299, 29, 'Avenger'), (298, 28, 'Shuttle'), (297, 28, 'Plutus'), (296, 28, 'Cowboy'), (295, 28, 'Aurora'), (294, 27, 'Limousine'), (293, 27, '2.8 - 5.3'), (292, 26, 'YRV'), (291, 26, 'Terios'), (290, 26, 'Storia'), (289, 26, 'Sirion'), (288, 26, 'Rocky'), (287, 26, 'Pyzar'), (286, 26, 'Move'), (285, 26, 'Mira'), (284, 26, 'Materia'), (283, 26, 'Feroza'), (282, 26, 'Esse'), (281, 26, 'Cuore'), (280, 26, 'Copen'), (279, 26, 'Charade'), (278, 26, 'Boon'), (277, 26, 'Be-go'), (276, 26, 'Atrai/extol'), (275, 26, 'Applause'), (274, 26, 'Altis'), (273, 25, 'Tico'), (272, 25, 'Tacuma'), (271, 25, 'Rezzo'), (270, 25, 'Racer'), (269, 25, 'Prince'), (268, 25, 'Nubira'), (267, 25, 'Nexia'), (266, 25, 'Matiz'), (265, 25, 'Magnus'), (264, 25, 'Leganza'), (263, 25, 'Lanos'), (262, 25, 'Lacetti'), (261, 25, 'LE Mans'), (260, 25, 'Kalos'), (259, 25, 'Evanda'), (258, 25, 'Espero'), (257, 25, 'Damas'), (256, 24, 'Shuttle'), (255, 24, 'City Leading'), (254, 23, '1410'), (253, 22, 'T-Rex'), (252, 21, 'ZX'), (251, 21, 'Xsara Picasso'), (250, 21, 'Xsara'), (249, 21, 'Xantia'), (248, 21, 'XM'), (247, 21, 'Visa'), (246, 21, 'Saxo'), (245, 21, 'LNA'), (244, 21, 'Jumpy'), (243, 21, 'Jumper'), (242, 21, 'Evasion'), (241, 21, 'C8'), (240, 21, 'C6'), (239, 21, 'C5'), (238, 21, 'C4 Picasso'), (237, 21, 'C4'), (236, 21, 'C3'), (235, 21, 'C25'), (234, 21, 'C2'), (233, 21, 'Berlingo'), (232, 21, 'BX'), (231, 21, 'AX'), (230, 20, 'Voyager'), (229, 20, 'Vision'), (228, 20, 'Tracker'), (227, 20, 'Town & Country'), (226, 20, 'Stratus'), (225, 20, 'Sebring'), (224, 20, 'Saratoga'), (223, 20, 'Prowler'), (222, 20, 'Pacifica'), (221, 20, 'PT Cruiser'), (220, 20, 'Neon'), (219, 20, 'NEW Yorker'), (218, 20, 'LHS'), (217, 20, 'LE Baron'), (216, 20, 'Intrepid'), (215, 20, 'Grand Voyager'), (214, 20, 'Fifth Avenue'), (213, 20, 'Crossfire'), (212, 20, 'Concorde'), (211, 20, 'Cirrus'), (210, 20, 'Aspen'), (209, 20, '300M'), (208, 20, '300C'), (207, 19, 'Viva'), (206, 19, 'Venture'), (205, 19, 'Van'), (204, 19, 'Uplander'), (203, 19, 'Trailblazer'), (202, 19, 'Tracker'), (201, 19, 'Tahoe'), (200, 19, 'Suburban'), (199, 19, 'Starcraft'), (198, 19, 'Spark'), (197, 19, 'Silverado'), (196, 19, 'Savana'), (195, 19, 'SSR'), (194, 19, 'Rezzo'), (193, 19, 'Prizm'), (192, 19, 'Niva'), (191, 19, 'Metro'), (190, 19, 'Lumina'), (189, 19, 'Lanos'), (188, 19, 'Lacetti'), (187, 19, 'Impala'), (186, 19, 'HHR'), (185, 19, 'Geo Storm'), (184, 19, 'Express'), (183, 19, 'Evanda'), (182, 19, 'Equinox'), (181, 19, 'Epica'), (180, 19, 'Corvette'), (179, 19, 'Corsica'), (178, 19, 'Colorado'), (177, 19, 'Cobalt'), (176, 19, 'Cavalier'), (175, 19, 'Captiva'), (174, 19, 'Caprice'), (173, 19, 'Camaro'), (172, 19, 'C-10'), (171, 19, 'Blazer'), (170, 19, 'Beretta'), (169, 19, 'Aveo'), (168, 19, 'Avalanche'), (167, 19, 'Astro'), (166, 19, 'Alero'), (165, 18, 'Tiggo'), (164, 18, 'Sweet (QQ)'), (163, 18, 'QQ6 (S21)'), (162, 18, 'Oriental Son'), (161, 18, 'Kimo (A1)'), (160, 18, 'Fora'), (159, 18, 'Flagcloud'), (158, 18, 'Amulet'), (157, 17, 'SUV'), (156, 17, 'Flying'), (155, 16, 'Super Seven'), (154, 15, 'XLR'), (153, 15, 'Seville'), (152, 15, 'STS'), (151, 15, 'SRX'), (150, 15, 'Fleetwood'), (149, 15, 'Escalade'), (148, 15, 'Eldorado'), (147, 15, 'DE Ville'), (146, 15, 'Catera'), (145, 15, 'CTS'), (144, 15, 'BLS'), (143, 14, 'FLYER II'), (142, 14, 'F3'), (141, 13, 'Skylark'), (140, 13, 'Roadmaster'), (139, 13, 'Riviera'), (138, 13, 'Rendezvous'), (137, 13, 'Reatta'), (136, 13, 'Park Avenue'), (135, 13, 'LE Sabre'), (134, 13, 'Enclave'), (133, 13, 'Century'), (132, 12, 'EB 16.4'), (131, 12, '57 SC Atlantic'), (130, 11, 'M2'), (129, 11, 'M1'), (128, 10, 'Z8'), (127, 10, 'Z4 M'), (126, 10, 'Z4'), (125, 10, 'Z3 M'), (124, 10, 'Z3'), (123, 10, 'Z1'), (122, 10, 'X6'), (121, 10, 'X5'), (120, 10, 'X3'), (119, 10, 'M6'), (118, 10, 'M5'), (117, 10, 'M3'), (116, 10, '8er 850'), (115, 10, '7er 760'), (114, 10, '7er 750'), (113, 10, '7er 745'), (112, 10, '7er 740'), (111, 10, '7er 735'), (110, 10, '7er 732'), (109, 10, '7er 730'), (108, 10, '7er 728'), (107, 10, '7er 725'), (106, 10, '6er 650'), (105, 10, '6er 645'), (104, 10, '6er 635'), (103, 10, '6er 630'), (102, 10, '6er 628'), (101, 10, '5er 550'), (100, 10, '5er 545'), (99, 10, '5er 540'), (98, 10, '5er 535'), (97, 10, '5er 530'), (96, 10, '5er 528'), (95, 10, '5er 525'), (94, 10, '5er 524'), (93, 10, '5er 523'), (92, 10, '5er 520'), (91, 10, '5er 518'), (90, 10, '3er 335'), (89, 10, '3er 330'), (88, 10, '3er 328'), (87, 10, '3er 325'), (86, 10, '3er 324'), (85, 10, '3er 323'), (84, 10, '3er 320'), (83, 10, '3er 318'), (82, 10, '3er 316'), (81, 10, '3er 315'), (80, 10, '1er 130'), (79, 10, '1er 120'), (78, 10, '1er 118'), (77, 10, '1er 116'), (76, 10, '02 (E10)'), (75, 9, 'Turbo R'), (74, 9, 'Mulsanne'), (73, 9, 'Continental'), (72, 9, 'Brooklands'), (71, 9, 'Azure'), (70, 9, 'Arnage'), (69, 8, 'Montego'), (68, 8, 'Mini MK'), (67, 8, 'Metro'), (66, 7, 'V8 (D11)'), (65, 7, 'TT'), (64, 7, 'S8'), (63, 7, 'S6'), (62, 7, 'S5'), (61, 7, 'S4'), (60, 7, 'S3'), (59, 7, 'S2'), (58, 7, 'RS6'), (57, 7, 'RS4'), (56, 7, 'R8'), (55, 7, 'Quattro'), (54, 7, 'Q7'), (53, 7, 'Coupe'), (52, 7, 'Cabriolet'), (51, 7, 'Allroad'), (50, 7, 'A8'), (49, 7, 'A6'), (48, 7, 'A5'), (47, 7, 'A4'), (46, 7, 'A3'), (45, 7, 'A2'), (44, 7, '200'), (43, 7, '100'), (42, 7, '90'), (41, 7, '80'), (40, 6, 'V8'), (39, 6, 'V12 Vanquish'), (38, 6, 'DBS'), (37, 6, 'DB9'), (36, 6, 'DB7'), (35, 5, 'Rocsta'), (34, 4, '24'), (33, 4, '10'), (32, 3, 'Roadster S'), (31, 3, 'B7'), (30, 3, 'B6'), (29, 3, 'B3'), (28, 3, 'B12'), (27, 3, 'B11'), (26, 2, 'Spider'), (25, 2, 'Giulietta'), (24, 2, 'GTV'), (23, 2, 'GT'), (22, 2, 'Brera'), (21, 2, 'Alfetta'), (20, 2, '166'), (19, 2, '164'), (18, 2, '159'), (17, 2, '156'), (16, 2, '155'), (15, 2, '147'), (14, 2, '146'), (13, 2, '145'), (12, 2, '75'), (11, 2, '33'), (10, 1, 'TSX'), (9, 1, 'TL'), (8, 1, 'RSX'), (7, 1, 'RL'), (6, 1, 'RDX'), (5, 1, 'NSX'), (4, 1, 'MDX'), (3, 1, 'Integra'), (2, 1, 'EL'), (1, 1, 'CL');
This main method shows how get scripts created by Hibernate ... Показать код
import org.hibernate.cfg.Configuration; import org.hibernate.dialect.MySQLDialect; import com.globallogic.volokh.beans.Authority; import com.globallogic.volokh.beans.Contact; /** * @author danylo.volokh * * This class is made to get Creation schema script generated by * Hibernate. Need this dependency * ** * */ public class HibernateScriptCreator { public static void main(String[] args) { Configuration cfg = new Configuration(); // add classes that are models and add Dialect depends witch DB are used cfg.addAnnotatedClass(Authority.class); cfg.addAnnotatedClass(Contact.class); String[] lines = cfg.generateSchemaCreationScript(new MySQLDialect()); System.out.println(lines); System.out.println(lines.length); for (int i = 0; i < lines.length; i++) { System.out.println(lines[i] + ";"); } } }org.hibernate.common *hibernate-commons-annotations *4.0.1.Final *
IDbCommand Extensions ... Показать код
public static class IDbCommandExtensions { public static void AddInParam(this IDbCommand thisObj, string name, DbType type) { thisObj.AddInParam(name, type, null); } public static void AddInParam(this IDbCommand thisObj, string name, DbType type, object value) { IDataParameter param = thisObj.CreateDBParam(name, type, value); thisObj.Parameters.Add(param); //Do not add until after all values have been set, in case of exception } public static void AddInParam(this IDbCommand thisObj, string name, DbType type, object value, int size) { IDbDataParameter param = thisObj.CreateDBParam(name, type, ParameterDirection.Input, value); param.Size = size; thisObj.Parameters.Add(param); //Do not add until after all values have been set, in case of exception } public static void AddOutParam(this IDbCommand thisObj, string name, DbType type) { thisObj.Parameters.Add(CreateDBParam(thisObj, name, type, ParameterDirection.Output, DBNull.Value)); } public static void AddOutParam(this IDbCommand thisObj, String name, DbType type, int size) { IDbDataParameter param = CreateDBParam(thisObj, name, type, ParameterDirection.Output, DBNull.Value); param.Size = size; thisObj.Parameters.Add(param); } public static IDbDataParameter CreateDBParam(this IDbCommand thisObj, string name, DbType type) { return CreateDBParam(thisObj, name, type, ParameterDirection.Input, null); } public static IDbDataParameter CreateDBParam(this IDbCommand thisObj, string name, DbType type, Object value) { return CreateDBParam(thisObj, name, type, ParameterDirection.Input, value); } public static IDbDataParameter CreateDBParam(this IDbCommand thisObj, string name, DbType type, ParameterDirection direction, Object value) { IDbDataParameter param = thisObj.CreateParameter(); param.ParameterName = name; param.DbType = type; param.Value = value ?? DBNull.Value; param.Direction = direction; return param; } public static T ExecuteScalar(this IDbCommand thisObj) { var result = thisObj.ExecuteScalar(); return NullSafeConvert.ConvertTo (result); } public static T ExecuteScalarOrDefault (this IDbCommand thisObj, T defaultValue) { var result = thisObj.ExecuteScalar(); return (Convert.IsDBNull(result) || result == null) ? defaultValue : NullSafeConvert.ConvertTo (result); } public static int ExecuteNonQuery(this IDbCommand thisObj, int retryCount) { if (thisObj.Transaction != null) return ExecuteNonQuery(thisObj, thisObj.Transaction.IsolationLevel, retryCount); else return ExecuteNonQuery(thisObj, IsolationLevel.Unspecified, retryCount); } public static int ExecuteNonQuery(this IDbCommand thisObj, IsolationLevel isolationLevel, int retryCount) { return ExecuteNonQuery(thisObj, isolationLevel, retryCount, 3000); } public static int ExecuteNonQuery(this IDbCommand thisObj, int retryCount, int delayInMilliseconds) { if (thisObj.Transaction != null) return ExecuteNonQuery(thisObj, thisObj.Transaction.IsolationLevel, retryCount, delayInMilliseconds); else return ExecuteNonQuery(thisObj, IsolationLevel.Unspecified, retryCount, delayInMilliseconds); } public static int ExecuteNonQuery(this IDbCommand thisObj, IsolationLevel isolationLevel, int retryCount, int delayInMilliseconds) { if (thisObj.Transaction != null) throw new InvalidOperationException("Command should not be associated with an existing transaction"); const int DEADLOCK_ERROR_NUMBER = 1205; bool wasSuccessful = false; int retryCounter = 0, result = 0; while (!wasSuccessful && retryCounter < retryCount) { thisObj.Transaction = GetTransaction(thisObj, isolationLevel); try { result = thisObj.ExecuteNonQuery(); if (thisObj.Transaction != null) thisObj.Transaction.Commit(); wasSuccessful = true; } catch (SqlException ex) { if (ex.Number != DEADLOCK_ERROR_NUMBER || retryCounter >= retryCount) { if (thisObj.Transaction != null) thisObj.Transaction.Rollback(); throw; } thisObj.Cancel(); Thread.Sleep(delayInMilliseconds); ; // set a delay wasSuccessful = false; retryCounter += 1; } } return result; } private static IDbTransaction GetTransaction(IDbCommand command, IsolationLevel isolationLevel) { return isolationLevel != IsolationLevel.Unspecified ? command.Connection.BeginTransaction(isolationLevel) : null; } }
IDb Connection Extensions ... Показать код
public static class IDbConnectionExtensions { public static IDbCommand CreateTextCommand(this IDbConnection thisObj, string sql) { return CreateCommand(thisObj, sql, CommandType.Text); } public static IDbCommand CreateStoredProcedureCommand(this IDbConnection thisObj, string storedProcedure) { return CreateCommand(thisObj, storedProcedure, CommandType.StoredProcedure); } internal static IDbCommand CreateCommand(this IDbConnection thisObj, string text, CommandType cmdType) { IDbCommand cmd = null; try { cmd = thisObj.CreateCommand(); cmd.Connection = thisObj; cmd.CommandText = text; cmd.CommandType = cmdType; return cmd; } catch (Exception) { cmd.TryDispose(); throw; } } public static T ExecuteScalar(this IDbConnection thisObj, string sql, Action action) { using (var cmd = thisObj.CreateTextCommand(sql)) { action(cmd); return cmd.ExecuteScalar (); } } public static T ExecuteScalar (this IDbConnection thisObj, string sql) { return thisObj.ExecuteScalar (sql, cmd => { }); } public static T ExecuteScalar (this IDbConnection thisObj, Action action) { return thisObj.ExecuteScalar (string.Empty, action); } public static int ExecuteNonQuery(this IDbConnection thisObj, string sql, Action action) { using (var cmd = thisObj.CreateTextCommand(sql)) { action(cmd); return cmd.ExecuteNonQuery(); } } public static int ExecuteNonQuery(this IDbConnection thisObj, Action action) { return thisObj.ExecuteNonQuery(string.Empty, action); } public static int ExecuteNonQuery(this IDbConnection thisObj, string sql) { using (var cmd = thisObj.CreateTextCommand(sql)) { return cmd.ExecuteNonQuery(); } } public static int ExecuteNonQuery(this IDbConnection thisObj, string sql, int retryCount) { return ExecuteNonQuery(thisObj, sql, retryCount, 3000); } public static int ExecuteNonQuery(this IDbConnection thisObj, string sql, int retryCount, int delayInMilliseconds) { using (var cmd = thisObj.CreateTextCommand(sql)) { return cmd.ExecuteNonQuery(retryCount, delayInMilliseconds); } } public static IDataReader ExecuteReader(this IDbConnection thisObj, string sql) { using (var cmd = thisObj.CreateTextCommand(sql)) { return cmd.ExecuteReader(); } } public static void WithinTransaction(this IDbConnection thisObj, Action action) { using (var transaction = thisObj.BeginTransaction()) { action(transaction); transaction.Commit(); } } }
Enterprise Library Database Extensions ... Показать код
public static class DatabaseExtensions { public static void WithConnection(this MSDB.Database thisObj, Actionaction) { using (var connection = thisObj.CreateConnection()) { connection.Open(); action(connection); } } public static T WithConnection (this MSDB.Database db, Func action) { using (var conn = db.CreateConnection()) { conn.Open(); return action(conn); } } public static void WithinTransaction(this MSDB.Database thisObj, Action action) { thisObj.WithConnection(conn => conn.WithinTransaction(action)); } public static T WithinTransaction (this MSDB.Database db, Func action) { return db.WithConnection( conn => { using (var transaction = conn.BeginTransaction()) { var result = action(transaction); transaction.Commit(); return result; } }); } public static void WithTextCommand(this MSDB.Database db, string sql, Action action) { db.WithConnection(conn => { using (var cmd = conn.CreateTextCommand(sql)) { action(cmd); } }); } public static T WithTextCommand (this MSDB.Database db, string sql, Func action) { return db.WithConnection(conn => { using (var cmd = conn.CreateTextCommand(sql)) { return action(cmd); } }); } public static T ExecuteScalar (this MSDB.Database db, string sql, Action action) { using (var conn = db.CreateConnection()) { conn.Open(); return conn.ExecuteScalar (sql, action); } } public static T ExecuteScalar (this MSDB.Database db, string sql) { return db.ExecuteScalar (sql, cmd => { }); } public static T ExecuteScalar (this MSDB.Database db, Action action) { return db.ExecuteScalar (string.Empty, action); } public static int ExecuteNonQuery(this MSDB.Database db, string sql, Action action) { using (var cmd = db.GetSqlStringCommand(sql)) { action(cmd); return db.ExecuteNonQuery(cmd); } } public static int ExecuteNonQuery(this MSDB.Database db, Action action) { return db.ExecuteNonQuery(string.Empty, action); } }