{"id":160897,"date":"2012-11-30T18:53:04","date_gmt":"2012-11-30T14:53:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=160897"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=160897","title":{"rendered":"<span class=\"post_title\">\u041e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u0445\u0430\u043a\u0430\u0445 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 entity framework \u0438 unique constraints<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/openclipart.org\/image\/250px\/svg_to_png\/132805\/Rainbow_Dragon.png\" alt=\"image\" align=\"left\"\/><br \/>  \u041f\u0430\u0440\u0443 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434, \u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0431\u044b\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438 \u0437\u0435\u043b\u0435\u043d\u044b\u0435, <s>\u043a\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0438 \u0437\u043b\u044b\u0435 \u0434\u043e\u0442\u043d\u0435\u0442\u0447\u0438\u043a\u0438, \u0438 \u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u2014 \u0430\u0433\u0430, \u043f\u043e\u043f\u0430\u043b\u0441\u044f!<\/s> \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043c\u043d\u0435 \u043f\u043e\u043c\u043e\u0447\u044c \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c \u0432 \u043e\u0434\u043d\u043e\u043c \u0432\u0435\u0441\u044c\u043c\u0430 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. <\/p>\n<p>  \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0435\u0431\u0435 \u043f\u0430\u0447\u043a\u0443 <i>\u0446\u0438\u0444\u0438\u0440\u0435\u0439<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0440\u0430\u0437 \u0432 \u043c\u0435\u0441\u044f\u0446, \u0432 \u043b\u044e\u0431\u0438\u043c\u043e\u043c \u0438\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0435 MS Office. \u0418 \u0432\u043e\u0442 \u0440\u0430\u0437 \u0432 \u043c\u0435\u0441\u044f\u0446 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u044d\u0442\u0438 \u0446\u0438\u0444\u0440\u044b \u043f\u0435\u0440\u0435\u0436\u0435\u0432\u044b\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432 \u0411\u0414 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c MS SQL. <\/p>\n<p>  \u0418 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u2014 \u044d\u0442\u043e\u0442 \u043c\u0435\u0433\u0430-\u0442\u0443\u043b \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0430 \u0441\u0443\u043f\u043f\u043e\u0440\u0442 \u0434\u0435\u0448\u0435\u0432\u044b\u043c \u0442\u043e \u043b\u0438 \u043c\u0430\u043b\u0430\u0439\u0446\u0430\u043c, \u0442\u043e \u043b\u0438 \u0438\u043d\u0434\u0443\u0441\u0430\u043c. \u0422\u0430\u043a \u0447\u0442\u043e \u0435\u0449\u0435 \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u041a\u0430\u043a \u043d\u0430\u0447\u0430\u043b\u0438 \u0440\u0435\u0448\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443<\/h4>\n<p>  <img decoding=\"async\" src=\"http:\/\/openclipart.org\/image\/250px\/svg_to_png\/25737\/Anonymous_Architetto_--_Dragon.png\" alt=\"image\" align=\"left\"\/><br \/>  \u0417\u043b\u044b\u0435 \u0434\u043e\u0442\u043d\u0435\u0442\u0447\u0438\u043a\u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0436\u0438\u0437\u043d\u044c \u2014 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0436\u0435 insert into \u0440\u0443\u043a\u0430\u043c\u0438, \u0435\u0441\u043b\u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u043e\u0442\u0447\u0435\u0442\u0435 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u0430 \u0438\u043c \u044d\u043a\u0441\u0435\u043b\u044c \u0434\u0430\u0435\u0442 \u0442\u0440\u0435\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0435. \u0410 \u0432 \u0434\u0440\u0435\u0432\u043d\u0435\u0439 \u0411\u0414 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0441\u0442\u043e\u043f\u043a\u0430 \u0442\u0430\u0431\u043b\u0438\u0446, \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u0435\u0442 \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. <\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u0430\u043a \u2014 \u0411\u0414 \u043f\u043e\u0434\u0441\u0443\u043d\u0443\u043b\u0438 \u0432\u0438\u0436\u0443\u0430\u043b\u0441\u0442\u0443\u0434\u0438\u0438, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u0443\u044e \u043f\u043e\u0440\u0442\u044f\u043d\u043a\u0443 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f entity framework. \u0412\u043c\u0435\u0441\u0442\u043e \u043f\u0438\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u0431\u0437\u0438\u043a\u043e\u043c \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f prepared statement \u0441 \u0441\u043e\u0442\u043d\u0435\u0439 \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u043a\u043e\u0432 \u0432 values(&#8230;) \u2014 \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 entity objects \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c context.SaveChanges().<\/p>\n<p>  <i>\u0417\u0430\u043c\u0435\u0447\u0443 \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0410 premature optimizations \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u2014 \u0437\u043b\u043e.<\/i><\/p>\n<h4>\u041d\u0430 \u0447\u0442\u043e \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u0441 \u0442\u0430\u043a\u0438\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c<\/h4>\n<p>  <img decoding=\"async\" src=\"http:\/\/openclipart.org\/image\/250px\/svg_to_png\/101773\/1293155427.png\" alt=\"image\" align=\"left\"\/><br \/>  <i>\u0427\u0443\u044e \u0437\u0430\u043f\u0430\u0445 \u0433\u043e\u0440\u0435\u043b\u043e\u0433\u043e. \u0421\u0440\u043e\u0447\u043d\u043e \u0431\u0435\u0433\u0443 \u043d\u0430 \u043a\u0443\u0445\u043d\u044e, \u0432\u044b\u043d\u0438\u043c\u0430\u044e \u043c\u044f\u0441\u043e \u0438\u0437 \u043b\u0430\u0442\u043a\u0438. \u041e\u0431\u0440\u0435\u0437\u0430\u044e \u0433\u043e\u0440\u0435\u043b\u043e\u0435 \u0434\u0432\u0443\u0440\u0443\u0447\u043d\u044b\u043c \u043c\u0435\u0447\u043e\u043c \u0438 \u0442\u0443\u0442 \u0436\u0435 \u043f\u0440\u043e\u0433\u043b\u0430\u0442\u044b\u0432\u0430\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u0423\u0433\u043e\u043b\u0435\u043a \u0432\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043d\u0430\u0442\u0443. \u0413\u043e\u0440\u044f\u0447\u043e! \u041d\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0430\u044e.<br \/>   \u2014 \u0427\u0442\u043e \u044d\u0442\u043e, \u041c\u0430\u0441\u0442\u0435\u0440?<br \/>   \u2014 \u041f\u0430\u0440\u043d\u0430\u044f \u043a\u0438\u0442\u044f\u0442\u0438\u043d\u0430. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0438\u0441\u043a \u043c\u043e\u0434\u044b!<br \/>   \u2014 \u041d\u0435 \u0437\u0430\u043b\u0438\u0432\u0430\u0439 \u2014 \u043f\u0440\u043e \u043c\u043e\u0434\u0443 \u0442\u044b \u0437\u043d\u0430\u0435\u0448\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0441\u043b\u043e\u0432\u0430\u0440\u044f, \u2014 \u043f\u0440\u043e\u0431\u0443\u0435\u0442. \u2014 \u0425\u043e\u0442\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043a\u0443\u0441\u043d\u043e!<br \/>  <\/i><\/p>\n<p>  \u0413\u043b\u0430\u0434\u043a\u043e \u0431\u044b\u043b\u043e \u043d\u0430 \u0431\u0443\u043c\u0430\u0433\u0435\u2026 Unique constraints \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u0446\u0438\u0444\u0435\u0440\u043a\u0438 \u0441\u043e\u0433\u043b\u0430\u0448\u0430\u043b\u0438\u0441\u044c \u043a\u0443\u0448\u0430\u0442\u044c.<\/p>\n<p>  \u041f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0438\u0439 \u0444\u0430\u043a\u0442 \u2014 \u0435\u0441\u043b\u0438 entity framework \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 database level exception, \u0442\u043e <s>\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u0437\u0443 \u0431\u0435\u0433\u0443\u0449\u0438\u0439 \u043a\u0430\u0431\u0430\u043d<\/s> \u043f\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043c\u0438\u043a\u0440\u043e\u0441\u043e\u0444\u0442\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0443\u0442\u044c \u2014 \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u0438\u0441\u0442\u0440\u0435\u043b\u0438\u0442\u044c \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u0434\u043e master \u0438\u0437 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c, \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0442\u044c, \u0438 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u0435\u0439 \u0432 catch().<\/p>\n<p>  \u0418 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u2014 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f.<\/p>\n<p>  \u041f\u043e\u0434\u043f\u043e\u0440\u043a\u0430 \u0441 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439, \u0434\u0430 \u0438 \u043a\u0430\u043a \u044d\u0442\u0438 \u0445\u0430\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043c\u0430\u043b\u0430\u0439\u0446\u044b \u2014 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441.<\/p>\n<p>  \u0418 \u0432\u043e\u0442 \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 <s>\u044d\u0442\u0438 \u0437\u043b\u044b\u0434\u043d\u0438 \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u0438 \u0443\u0442\u044e\u0433 \u0438 \u043f\u0430\u044f\u043b\u044c\u043d\u0438\u043a!<\/s> \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u043c\u0435\u043d\u044f.<\/p>\n<h4>\u0427\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c<\/h4>\n<p>  <img decoding=\"async\" src=\"http:\/\/openclipart.org\/image\/250px\/svg_to_png\/115\/PeterM_Dragon.png\" alt=\"image\" align=\"left\"\/><br \/>  <i>\u041a\u0430\u0440\u0430\u043f\u0435\u0442 \u0432\u043e\u0437\u043c\u0443\u0449\u0435\u043d. <br \/>   \u2014 \u0412\u0440\u0435\u0434\u0438\u043d\u044b! \u041f\u0440\u043e\u0441\u0438\u043b\u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u0441\u0442\u043e \u043a\u0438\u043b\u043e\u0433\u0440\u0430\u043c\u043c, \u0430 \u0443\u0445\u043d\u0443\u043b\u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e! \u0422\u044b \u043c\u043d\u0435 \u0442\u0430\u043a \u0438 \u0441\u043a\u0430\u0436\u0438 \u2014 \u043d\u0430\u0434\u043e \u043c\u043d\u043e\u0433\u043e, \u0437\u0430\u0447\u0435\u043c \u043e\u0431\u043c\u0430\u043d\u044b\u0432\u0430\u0442\u044c \u041a\u0430\u0440\u0430\u043f\u0435\u0442\u0430? \u041c\u043d\u0435 \u0436\u0435 \u043d\u0435 \u0436\u0430\u043b\u043a\u043e, \u043d\u0430\u0434\u043e \u043f\u044f\u0442\u044c \u0442\u043e\u043d\u043d \u2014 \u0442\u0430\u043a \u0438 \u0441\u043a\u0430\u0436\u0438, \u041a\u0430\u0440\u0430\u043f\u0435\u0442, \u0434\u0430\u0439 \u043d\u0430\u043c \u043f\u044f\u0442\u044c \u0442\u043e\u043d\u043d\u2026 \u0412\u0440\u0435\u0434\u0438\u043d\u044b \u043e\u043d\u0438 \u0432\u0440\u0435\u0434\u0438\u043d\u044b \u0438 \u0435\u0441\u0442\u044c!<\/i><\/p>\n<p>  \u041a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 CancelChanges \u0432 entity framework \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e. \u0410 \u0435\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0434\u0430\u043b\u043e \u0431\u044b \u0448\u0430\u043d\u0441 \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c.<\/p>\n<p>  \u041a\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0437\u043e\u0431\u0440\u0435\u0441\u0442\u0438.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u043f\u043e\u0448\u0430\u0440\u0438\u0442\u044c \u043f\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443, \u0438 \u0432\u044b\u043b\u043e\u0432\u0438\u0442\u044c \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 <s>\u0431\u043e\u043b\u044c\u043d\u043e\u0439 \u0437\u0443\u0431<\/s> \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443. \u0418 \u2014 \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u0435\u0433\u043e \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0432 \u0411\u0414 \u043d\u0435 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u2014 \u043d\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0410 \u0441 \u043a\u0440\u0438\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0443\u0441\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f, \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043c \u2014 \u0433\u0434\u0435 \u0442\u0430\u043a\u043e\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c.<\/p>\n<h5>\u041a\u0443\u0434\u044b \u043b\u043e\u0436\u0438\u0442\u044c?<\/h5>\n<p>  <img decoding=\"async\" src=\"http:\/\/openclipart.org\/image\/250px\/svg_to_png\/13446\/antontw_Chinese_Dragon.png\" alt=\"image\" align=\"left\"\/><br \/>  <i> \u2014 \u0410\u0444\u0430, \u0432\u043e\u0437\u044c\u043c\u0438 \u0441\u0435\u0431\u044f \u0432 \u0440\u0443\u043a\u0438!<br \/>  \u041e\u0431\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e \u0441\u0435\u0431\u044f \u0440\u0443\u043a\u0430\u043c\u0438, \u043e\u0442\u0440\u044b\u0432\u0430\u044e\u0441\u044c \u043e\u0442 \u043f\u043e\u043b\u0430 \u043d\u0430 \u0431\u0438\u043e\u0433\u0440\u0430\u0432\u0430\u0445.<br \/>   \u2014 \u0412\u0437\u044f\u043b. \u041a\u0443\u0434\u044b \u043b\u043e\u0436\u0438\u0442\u044c?<br \/>  <\/i><\/p>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u044f \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043b\u0441\u044f \u0434\u043b\u044f insertions \u043a\u0430\u043a \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438 update. \u042f \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043f\u043e\u0440\u0442\u044f\u043d\u043a\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u043c\u0430\u043b\u043e \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439, \u0434\u0430 \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c updates \u043f\u0440\u043e\u0449\u0435. Delete \u0443 \u043d\u0430\u0441 \u043a\u0430\u043a \u0440\u0430\u0437 \u043d\u0435\u0442\u0443 \u2014 \u044d\u0442\u043e \u0436 \u043f\u0430\u0440\u0430\u043d\u043e\u0439\u044f \u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0435\u0439 \u0431\u0430\u043d\u043a\u0438\u0440\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u0438\u0437 \u0411\u0414 \u0447\u0442\u043e-\u0442\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c? \u041d\u0438-\u043d\u0438!<\/p>\n<p>  \u041f\u043e\u043a\u0443\u0440\u0438\u0432 \u043c\u0430\u043d\u0443\u0430\u043b\u044b \u0438 \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0432, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"cs\">        class MyEntry         {             public EntityObject entity;             public string name;             public Dictionary&lt;string, EntityKey&gt; refmap;             public Dictionary&lt;string, EntityObject&gt; objmap;             public Dictionary&lt;EntityObject, string&gt; keymap;              public MyEntry(string s, EntityObject o)             {                 entity = o;                 name = s;                 refmap = new Dictionary&lt;string, EntityKey&gt;();                 objmap = new Dictionary&lt;string, EntityObject&gt;();                 keymap = new Dictionary&lt;EntityObject, string&gt;();             }         } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u043c\u0430\u0433\u0438\u0435\u0439. \u0412\u043e\u0442 \u0442\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u2014 \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e SaveChanges():<\/p>\n<pre><code class=\"cs\">            \/\/ added relationships             \/\/ t means derived class from EntityContext             var added = t.ObjectStateManager.GetObjectStateEntries(EntityState.Added); <\/code><\/pre>\n<p>  \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u2014 \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0431\u044b\u043b\u043e, \u0438 \u043f\u0435\u0440\u0435\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0434\u043b\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a.<\/p>\n<pre><code class=\"cs\">            List&lt;MyEntry&gt; allDataToProceed = new List&lt;MyEntry&gt;();             List&lt;ObjectStateEntry&gt; refs = new List&lt;ObjectStateEntry&gt;();             foreach (var a in added)             {                 if (a.IsRelationship)                 {                     var aaa = a.EntitySet.Name;                     var from = ((AssociationSet)a.EntitySet).AssociationSetEnds[0];                     var to = ((AssociationSet)a.EntitySet).AssociationSetEnds[1];                 }                 else                 {                     MyEntry e = new MyEntry(a.EntitySet.Name, a.Entity);                     allDataToProceed.Add(e);                     IEnumerable&lt;IRelatedEnd&gt; relEnds =                          ((IEntityWithRelationships)a.Entity).RelationshipManager.GetAllRelatedEnds();                     foreach (var rel in relEnds)                     {                         List&lt;EntityObject&gt; fks = new List&lt;EntityObject&gt;();                         foreach (var obj in rel)                             fks.Add((EntityObject)obj);                          var relname = rel.RelationshipName;                         if (fks.Count == 1)                         {                             if (fks[0].EntityKey.EntityKeyValues != null)                                 e.refmap[relname] = fks[0].EntityKey;                             else                             {                                 e.keymap[fks[0]] = fks[0].EntityKey.EntitySetName;                                 e.objmap[relname] = fks[0];                             }                         }                     }                 }             } <\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c \u2014 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043a \u0436\u0438\u0437\u043d\u0438<\/p>\n<pre><code class=\"cs\">            foreach (var a1 in added)                 a1.Delete();             t.SaveChanges(); <\/code><\/pre>\n<p>  \u0438 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0441\u0435\u0430\u043d\u0441\u0443 \u044d\u043a\u0437\u043e\u0440\u0446\u0438\u0437\u043c\u0430 \u2014 \u0430 \u0447\u0442\u043e \u044d\u0442\u043e \u0443 \u043d\u0430\u0441 \u0442\u0443\u0442 \u0442\u0430\u043a\u043e\u0435 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043f\u043e\u043b\u0437\u043b\u043e, \u0438 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u043a\u0443\u0434\u0430 \u0435\u0433\u043e \u0434\u0435\u0432\u0430\u0442\u044c.<\/p>\n<h5>\u041d\u0435 \u0434\u043e\u043c\u0430 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043e\u0440\u0438<\/h5>\n<p>  <img decoding=\"async\" src=\"http:\/\/openclipart.org\/image\/250px\/svg_to_png\/12522\/Angelo_Gemmi_chinese_dragon.png\" alt=\"image\" align=\"left\"\/><br \/>  <i>\u041e\u0442 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043f\u0430\u0435\u0442\u0441\u044f \u044d\u043a\u0440\u0430\u043d. \u0411\u0435\u0440\u0443 \u0432\u0435\u043d\u0438\u043a \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u044e \u043e\u0441\u043a\u043e\u043b\u043a\u0438 \u2014 \u044f \u0436\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u044d\u043a\u0441\u043f\u0435\u0434\u0438\u0446\u0438\u0438. \u0423\u0433\u043e\u043b \u0447\u0442\u043e-\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u2014 \u043a\u0430\u043a\u043e\u0439 \u0443 \u043d\u0435\u0433\u043e \u043f\u0438\u0441\u043a\u043b\u044f\u0432\u044b\u0439 \u0433\u043e\u043b\u043e\u0441 \u043d\u0430 \u0433\u043b\u0443\u0431\u0438\u043d\u0435 \u0432 \u0442\u0440\u0438 \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u0430. \u0413\u043e\u0432\u043e\u0440\u044e \u0435\u043c\u0443<br \/>   \u2014 \u0414\u043e\u043c\u0430 \u043d\u0435 \u043e\u0440\u0438.<br \/>  \u041f\u043e\u0434\u0443\u043c\u0430\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e<br \/>   \u2014 \u0418 \u043d\u0435 \u0434\u043e\u043c\u0430 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043e\u0440\u0438.<br \/>  <\/i><\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u044d\u0442\u043e \u0443\u0447\u0435\u0441\u0442\u044c foreign keys. \u0415\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0438 master-slave \u2014 \u0442\u043e \u043d\u0435 \u043d\u0430\u0434\u043e master \u0438 slave \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0430 \u0442\u043e \u0442\u0430\u043a \u0438 referral integrity \u0441\u043b\u043e\u043c\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e.<\/p>\n<pre><code class=\"cs\">            \/\/ now we need to remove objects already referenced by FK to not add the same              \/\/ objects twice in collection             List&lt;EntityObject&gt; usedInRefs = new List&lt;EntityObject&gt;();             foreach (var a1 in allDataToProceed)             {                 foreach (var dup in a1.objmap.Values)                     usedInRefs.Add(dup);             }               for (int j = 0; j &lt; allDataToProceed.Count; ++j)             {                 if (usedInRefs.Contains(allDataToProceed[j].entity))                 {                     allDataToProceed.RemoveAt(j);                     --j;                 }             } <\/code><\/pre>\n<p>  \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c \u2014 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u0438\u0445\u0430\u0442\u044c \u0432 \u0411\u0414 \u0442\u043e \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043f\u0438\u0438 foreign keys \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u0423\u0434\u0430\u043b\u043e\u0441\u044c? \u043e\u0442\u043b\u0438\u0447\u043d\u043e, \u043d\u0435\u0442 \u2014 \u0437\u043d\u0430\u0447\u0438\u0442 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0448 \u0431\u043e\u043b\u044c\u043d\u043e\u0439 \u0437\u0443\u0431.<\/p>\n<pre><code class=\"cs\">            foreach (var a1 in allDataToProceed)             {                 try                 {                     IEnumerable&lt;IRelatedEnd&gt; relEnds =                          ((IEntityWithRelationships)a1.entity).RelationshipManager.GetAllRelatedEnds();                     foreach (var rel in relEnds)                     {                         var relname = rel.RelationshipName;                         EntityKey key = null;                         if (a1.refmap.ContainsKey(relname)) key = a1.refmap[relname];                         EntityObject o = key != null ? o = (EntityObject)t.GetObjectByKey(key) : null;                          if (o == null && a1.objmap.ContainsKey(relname))                         {                             o = a1.objmap[relname];                             if (a1.keymap.ContainsKey(o)) t.AddObject(a1.keymap[o], o);                             else o = null;                         }                         if (o != null) rel.Add(o);                     }                      t.AddObject(a1.name, a1.entity);                     t.SaveChanges();                 }                 catch (Exception e2)                 {                     added = t.ObjectStateManager.GetObjectStateEntries(EntityState.Added);                     foreach (var a2 in added) a2.Delete();                     \/\/ now we can move back to excel cheet and unform which data is wrong                  }             } <\/code><\/pre>\n<p>  \u0412\u0443\u0430\u043b\u044f. <i>We did it!<\/i><\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c.    \t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/160897\/\"> http:\/\/habrahabr.ru\/post\/160897\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/openclipart.org\/image\/250px\/svg_to_png\/132805\/Rainbow_Dragon.png\" alt=\"image\" align=\"left\"\/><br \/>  \u041f\u0430\u0440\u0443 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434, \u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u0431\u044b\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438 \u0437\u0435\u043b\u0435\u043d\u044b\u0435, <s>\u043a\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0438 \u0437\u043b\u044b\u0435 \u0434\u043e\u0442\u043d\u0435\u0442\u0447\u0438\u043a\u0438, \u0438 \u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u2014 \u0430\u0433\u0430, \u043f\u043e\u043f\u0430\u043b\u0441\u044f!<\/s> \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043c\u043d\u0435 \u043f\u043e\u043c\u043e\u0447\u044c \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c \u0432 \u043e\u0434\u043d\u043e\u043c \u0432\u0435\u0441\u044c\u043c\u0430 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. <\/p>\n<p>  \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0435\u0431\u0435 \u043f\u0430\u0447\u043a\u0443 <i>\u0446\u0438\u0444\u0438\u0440\u0435\u0439<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0440\u0430\u0437 \u0432 \u043c\u0435\u0441\u044f\u0446, \u0432 \u043b\u044e\u0431\u0438\u043c\u043e\u043c \u0438\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0435 MS Office. \u0418 \u0432\u043e\u0442 \u0440\u0430\u0437 \u0432 \u043c\u0435\u0441\u044f\u0446 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u044d\u0442\u0438 \u0446\u0438\u0444\u0440\u044b \u043f\u0435\u0440\u0435\u0436\u0435\u0432\u044b\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432 \u0411\u0414 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c MS SQL. <\/p>\n<p>  \u0418 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u2014 \u044d\u0442\u043e\u0442 \u043c\u0435\u0433\u0430-\u0442\u0443\u043b \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0430 \u0441\u0443\u043f\u043f\u043e\u0440\u0442 \u0434\u0435\u0448\u0435\u0432\u044b\u043c \u0442\u043e \u043b\u0438 \u043c\u0430\u043b\u0430\u0439\u0446\u0430\u043c, \u0442\u043e \u043b\u0438 \u0438\u043d\u0434\u0443\u0441\u0430\u043c. \u0422\u0430\u043a \u0447\u0442\u043e \u0435\u0449\u0435 \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-160897","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/160897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=160897"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/160897\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=160897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=160897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=160897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}