{"id":285429,"date":"2017-04-24T15:00:29","date_gmt":"2017-04-24T11:00:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=285429"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=285429","title":{"rendered":"\u041a\u0430\u043a \u043c\u044b \u0438\u0437 CRUD-\u0434\u0432\u0438\u0436\u043a\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u0435\u043b\u0430\u043b\u0438"},"content":{"rendered":"<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0443\u0447\u0435\u0442\u043d\u043e-\u043e\u0442\u0447\u0435\u0442\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u0435\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0443\u0447\u0451\u0442\u043d\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e \u201c\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439\u201d \u043b\u043e\u0433\u0438\u043a\u043e\u0439. \u041f\u043e\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0432\u0438\u0434\u0443 \u0442\u043e, \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u0432\u0438\u0434\u0435 \u0431\u0430\u043d\u0430\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0440\u043e\u0432\u043d\u043e \u0442\u043e, \u043e \u0447\u0451\u043c \u0432\u044b \u043f\u043e\u0434\u0443\u043c\u0430\u043b\u0438. \u0425\u043e\u0442\u044f \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438, \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f JavaScript (client side, server side), SQL (\u0438 \u0432\u043e\u0442 \u0442\u043e\u0433\u0434\u0430 \u0443\u0436\u0435 \u044d\u0442\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c). <\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0432\u043e\u043f\u0440\u043e\u0441\u044b:<\/p>\n<ul>\n<li>\u0412\u044b\u0431\u043e\u0440\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0422\u043e\u0447\u043d\u0435\u0435 \u0448\u0430\u0440\u0434\u0438\u043d\u0433 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0431\u0434 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438.<\/li>\n<li>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0422.\u0435. \u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043a \u0447\u0435\u043c\u0443 \u043e\u043d \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f. \u041a\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b.<\/li>\n<li>\u201c\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f\u201d \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 (\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u0438 \u0432\u0441\u0451 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u043e\u0439) \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/li>\n<li>\u0421\u043e\u0445\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/li>\n<\/ul>\n<p><a name=\"habracut\"><\/a><br \/>  \u0421\u0443\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0437\u0430\u0434\u0430\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0439 (\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432) \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0411\u0414 \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430. \u0418 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0434\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0435\u0439 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b <a href=\"https:\/\/ru.wikipedia.org\/wiki\/CRUD\">CRUD<\/a> \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0438\u0445 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 (\u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432) \u0434\u043b\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438. \u0422\u0430\u043a\u043e\u0439 \u0433\u0440\u0430\u0444 \u043f\u043e \u0441\u0443\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438. \u0412\u0441\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043f\u043e \u0432\u0435\u0434\u0435\u043d\u0438\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0442\u043e\u0436\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/919\/0e8\/1fc\/9190e81fcf094a96aeffbd949a72c1f2.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/30e\/d31\/9ec\/30ed319ecce14f6ca185380611a90869.png\"\/>  <\/div>\n<\/div>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0432\u0430\u0440 \u0438\u043c\u0435\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0432\u0435\u0441, \u0446\u0435\u043d\u0430, \u0441\u0440\u043e\u043a \u0433\u043e\u0434\u043d\u043e\u0441\u0442\u0438, \u0434\u0430\u0442\u0430 \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0434\u0440. \u0422\u043e\u0432\u0430\u0440 \u0438\u043c\u0435\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430 \u0441\u043a\u043b\u0430\u0434\u0435, \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435, \u043a\u0443\u043f\u043b\u0435\u043d. \u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u0432\u0438\u0434\u0438\u0442 \u0442\u043e\u0432\u0430\u0440\u044b \u0432 \u0441\u0432\u043e\u0435\u043c \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435. \u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u043c\u044f\u0441\u043d\u0438\u043a \u0432\u0438\u0434\u0438\u0442 \u0432\u0441\u044e \u043c\u044f\u0441\u043d\u0443\u044e \u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438\u044e \u0441\u0435\u0442\u0438. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u044d\u0442\u043e \u0432\u0441\u0451 \u043e\u0447\u0435\u043d\u044c \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u043e. <\/p>\n<p>  \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u201c\u0434\u043b\u044f \u0441\u0435\u0431\u044f\u201d. \u041d\u0430\u043c \u043e\u0447\u0435\u043d\u044c \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0434\u043b\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0442\u043d\u0438 \u0442\u0430\u0431\u043b\u0438\u0446, \u0441\u0442\u0440\u0430\u043d\u0438\u0446 CRUD, \u043a\u0443\u0447\u0443 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0442\u0447\u0451\u0442\u043e\u0432, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 (\u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b). \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u0438\u043c \u0442\u043e\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c. \u0415\u0441\u043b\u0438 \u043d\u0430\u0441 \u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e, \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u043b \u043d\u0430\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0435\u0435 \u0434\u0435\u0448\u0435\u0432\u0438\u0437\u043d\u0443 (\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u044f\u0434\u0440\u0430, \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0432\u043d\u0438\u043a\u0430\u043b\u0438 \u0432 \u0431\u0438\u0437\u043d\u0435\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b), \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u0435\u043b\u0430\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438. \u0422\u043e, \u0447\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0431\u044b\u043b \u0441\u0432\u043e\u0438\u043c, \u0434\u0430\u0432\u0430\u043b\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0443\u0448\u0435 \u0443\u0433\u043e\u0434\u043d\u043e. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u043e\u0441\u044c \u044f\u0434\u0440\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  \u0420\u0430\u043d\u044c\u0448\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0430 \u043c\u044b \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043b\u0438 \u043a\u043e\u043f\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438 \u044d\u0442\u0443 \u043a\u043e\u043f\u0438\u044e \u043d\u0430 \u0435\u0433\u043e \u0438\u043b\u0438 \u043d\u0430\u0448\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043f\u043e\u0434 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0430. \u041a\u043e\u0433\u0434\u0430 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u043c\u0435\u043d\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0449\u0435 \u0434\u0435\u0441\u044f\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 URL \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438), \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c, IIS \u0437\u0430\u043d\u044f\u043b \u0432\u0441\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043e\u0449\u0443\u0442\u0438\u043c\u043e \u043f\u0440\u043e\u0441\u0435\u043b\u0430. \u0411\u044b\u043b\u043e \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 IIS \u0438 \u043f\u0440\u0438 \u0434\u043e\u043f\u0438\u043b\u0438\u0432\u0430\u043d\u0438\u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0438\u0433\u0440\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0435 \u0442\u043e (\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0430\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435) \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u041d\u043e \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u0438\u0434\u0451\u043c \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0432 \u0442\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438. <\/p>\n<h3>\u0412\u044b\u0431\u043e\u0440 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b<\/h3>\n<p>  \u041f\u043e\u0434\u0443\u043c\u0430\u0432 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445 \u043c\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u0442\u0440\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445:<\/p>\n<ol>\n<li>\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c. \u0410 \u0435\u0449\u0435 \u043b\u0443\u0447\u0448\u0435, \u0447\u0442\u043e\u0431\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0441\u0430\u043c\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u043c.<\/li>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0432\u044b\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u0438 \u0442\u0435\u0445 \u0436\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445.<\/li>\n<li>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0431\u043e\u043b\u044c\u044e. \u0423 \u043d\u0430\u0441 \u0431\u044b\u043b\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0442\u044c \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/li>\n<\/ol>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u043c\u043e\u0437\u0433\u043e\u0432\u043e\u0439 \u0448\u0442\u0443\u0440\u043c. \u041d\u0430 \u043d\u0451\u043c \u0431\u044b\u043b\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0442\u0440\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0412\u0430\u0440\u0438\u0430\u043d\u0442 1:<\/p>\n<p>  \u0412\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u0443\u043f\u0435\u0440-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0417\u0430\u0432\u0435\u0441\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c ApplicationEntity, \u0432\u0441\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0411\u0414) \u0434\u043e\u043b\u0436\u043d\u044b \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0432\u043e\u0439 ApplicationEntity. \u041d\u0430 \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044e \u043f\u0440\u0430\u0432 (\u043a\u0442\u043e \u0447\u0442\u043e \u0432\u0438\u0434\u0438\u0442, \u043a\u0442\u043e \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u0442 \u0438 \u0442.\u043f.). <\/p>\n<p>  \u041f\u043b\u044e\u0441\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 1: <\/p>\n<ul>\n<li>\u0418\u0434\u0435\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f. \u0418\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u043e\u0442\u043a\u043d\u0443\u0442\u044c \u043f\u0430\u0440\u0443 \u0441\u043e\u0442\u0435\u043d if \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443. <\/li>\n<li>\u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u0431\u043b\u0438\u0446 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a, \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e.<\/li>\n<li>\u0421\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c. \u041e\u0434\u0438\u043d \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440, \u043e\u0434\u043d\u0430 \u0431\u0430\u0437\u0430, \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439.<\/li>\n<\/ul>\n<p>  \u041c\u0438\u043d\u0443\u0441\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 1: <\/p>\n<ul>\n<li>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u043c (\u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438). \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0442\u043e \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u0440\u0438\u0441\u043a, \u0447\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0439. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0434\u0438\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0447\u0430\u0441\u0442\u0438 \u0430\u0434\u043c\u0438\u043d\u043a\u0438 \u0447\u0443\u0436\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. <\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0441\u0443\u043f\u0435\u0440-\u0431\u0430\u0437\u0430 \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043b\u043e\u0445\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u043d\u0430 2+ \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0448\u0430\u0440\u0434\u0438\u043d\u0433\u0430\/\u0440\u0435\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0421\u0423\u0411\u0414. \u042d\u0442\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e, \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e. \u0413\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435 \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0431\u0430\u0437\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432.<\/li>\n<\/ul>\n<p>  \u0412\u0430\u0440\u0438\u0430\u043d\u0442 2:<\/p>\n<p>  \u0418\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043c\u0438\u043d\u0443\u0441\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430 \u0440\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0412\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c, \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e (\u043e\u0434\u043d\u0443 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430). \u0412\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u043b\u043e\u0432\u0438\u0442 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u0438\u0434\u0430 *.getreport.pro, \u043f\u043e \u0434\u043e\u043c\u0435\u043d\u0443 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0432 \u043c\u0438\u043d\u0438 \u0411\u0414 \u043c\u0430\u043f\u043f\u0435\u0440\u0435 \u0438\u0449\u0435\u0442 connectionstring \u0434\u043e \u043d\u0443\u0436\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0414\u0430\u043b\u0435\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u0441\u0442\u0430\u0440\u043e\u043c\u0443, \u0442.\u043a. \u0412 \u0431\u0430\u0437\u0435, \u043a\u0443\u0434\u0430 \u043c\u044b \u043f\u0440\u0438\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u043b\u0438\u0441\u044c \u043b\u0435\u0436\u0430\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>  \u041f\u043b\u044e\u0441\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 2:<\/p>\n<ul>\n<li>\u0420\u0430\u0437\u043d\u044b\u0435 \u0431\u0430\u0437\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e. \u0412\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u0441 \u0447\u0443\u0436\u043e\u0439 \u0431\u0430\u0437\u043e\u0439, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 connectionstring \u0434\u043e \u043d\u0435\u0451. \u0410 \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0435\u0442, \u0442\u043e \u0432 \u0448\u0442\u0430\u0442\u043d\u043e\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0430\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0432\u043e\u0435\u0439 \u0431\u0430\u0437\u044b (\u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u0442\u043b\u0430\u0436\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043e\u0441\u043d\u043e\u0432\u0430 \u044f\u0434\u0440\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b). <\/li>\n<li>\u0420\u0430\u0437\u043d\u044b\u0435 \u0431\u0430\u0437\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0431\u0435\u0437 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0431\u043e\u043b\u0438. \u0412\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 IIS.<\/li>\n<li>\u0421\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c. \u041e\u0434\u0438\u043d \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440, \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439. Code-first \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0430\u0432\u0442\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u0431\u0430\u0437\u044b \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043c\u0435\u043d\u0435\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439, \u0447\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0431\u0430\u0437\u043e\u0439.<\/li>\n<li>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 connectionstring \u0434\u043e \u0435\u0433\u043e \u0411\u0414, \u0447\u0442\u043e\u0431\u044b \u043a\u043b\u0438\u0435\u043d\u0442 \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u043b, \u0447\u0442\u043e \u0435\u0433\u043e \u0431\u0430\u0437\u0430 \u043f\u043e\u0434 \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c, \u0447\u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043d\u0435\u0439 \u0432\u0441\u0451 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e.<\/li>\n<\/ul>\n<p>  \u041c\u0438\u043d\u0443\u0441\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 2: <\/p>\n<ul>\n<li>\u0417\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0431\u0430\u0437 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0441\u043b\u0435\u0434\u0438\u0442\u044c. \u041d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0447\u0442\u043e \u0432\u0441\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0432\u0441\u0435 \u0431\u0430\u0437\u044b \u043d\u0430\u043a\u0430\u0442\u0438\u043b\u0438\u0441\u044c.<\/li>\n<li>\u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u0438\u0442\u0440\u043e\u0435 \u043f\u043e \u043a\u043e\u0434\u0443 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u0443\u044e \u043d\u043e\u0432\u0443\u044e \u0411\u0414 (\u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 code first, \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 restore \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0439 \u0431\u0434), \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0421\u0423\u0411\u0414, \u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 \u043d\u043e\u0432\u043e\u043c\u0443 \u044e\u0437\u0435\u0440\u0443 \u0438 \u0442.\u043f. <\/li>\n<\/ul>\n<p>  \u0412\u0430\u0440\u0438\u0430\u043d\u0442 3:<\/p>\n<p>  \u0421\u0435\u0440\u0432\u0438\u0441-\u043a\u043e\u0440\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d. \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e \u043e\u0434\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0411\u0414. \u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>  \u041f\u043b\u044e\u0441\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 3:<\/p>\n<ul>\n<li>\u041f\u043e\u043b\u043d\u0430\u044f \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c. \u041a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0441\u0432\u043e\u0435\u0439 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435.<\/li>\n<li>\u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043a\u043e\u0440\u043e\u0431\u043a\u0443 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u0430\u0435\u043c \u0435\u043c\u0443 \u0444\u0430\u0439\u043b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438.<\/li>\n<li>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e. \u0422.\u0435. \u0412 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u2014 \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/li>\n<li>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u043a\u0430 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u043e\u043d \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438 \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/li>\n<li>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 connectionstring \u0434\u043e \u0435\u0433\u043e \u0411\u0414, \u0447\u0442\u043e\u0431\u044b \u043a\u043b\u0438\u0435\u043d\u0442 \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0447\u0442\u043e \u0435\u0433\u043e \u0431\u0430\u0437\u0430 \u043f\u043e\u0434 \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c, \u0447\u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043d\u0435\u0439 \u0432\u0441\u0451 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e.<\/li>\n<\/ul>\n<p>  \u041c\u0438\u043d\u0443\u0441\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 3: <\/p>\n<ul>\n<li>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441 \u2014 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0420\u0430\u043d\u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442, \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443, \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u041e\u0421 \u0438 \u0421\u0423\u0411\u0414. CPU \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0435\u0434\u0430\u0442\u044c, \u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430\u0434\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e. \u041e\u0431\u044b\u0447\u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0435 \u0446\u0435\u043d\u044b.<\/li>\n<li>\u041e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u00ab\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u043e\u0440\u00bb. \u041a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0431\u0435\u0433\u0430\u0442\u044c \u043f\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430\u043c, \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0431\u0430\u0437\u0443 \u0438 \u0431\u0438\u043d\u044b. \u041b\u0438\u0431\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u00ab\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u043e\u0440\u00bb \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u0441\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0435\u0440\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e FTP (\u0438\u043b\u0438 \u043a\u0430\u043a \u0442\u043e \u0442\u0430\u043a). \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u0442\u0430\u043a\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u2014 \u0434\u0435\u043b\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u0435\u0441\u0451\u043b\u043e\u0435.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u0432\u0435\u0449\u0430\u043d\u0438\u0439 <b>\u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442<\/b>. \u041d\u0438\u0436\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043b\u044e\u0441\u0430\u043c\u0438, \u0438 \u043a\u0430\u043a \u043c\u044b \u043d\u0438\u0432\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0435\u0433\u043e \u043c\u0438\u043d\u0443\u0441\u044b.<\/p>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430<\/h3>\n<p>  \u0415\u0441\u0442\u044c \u0435\u0434\u0438\u043d\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u0432\u0441\u0435\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c, \u043e\u043d\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u0432\u0435\u0431-\u0444\u0435\u0440\u043c\u0443. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0443\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438. <\/p>\n<p>  \u041a\u043b\u0438\u0435\u043d\u0442 \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0441 URL \u0430\u0434\u0440\u0435\u0441\u043e\u043c myapplication.getreport.pro, \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0411\u0414, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0438 \u043c\u0435\u0436\u0434\u0443 URL \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 connectionstring \u0434\u043e \u0431\u0430\u0437\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 connectionstring \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 \u0421\u0423\u0411\u0414, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0432\u043e\u044e \u0411\u0414.<\/p>\n<p>  \u0414\u043b\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0431\u0430\u0437\u0435 \u044d\u0442\u043e\u0442 \u043c\u0430\u043f\u043f\u0438\u043d\u0433 \u043f\u043e\u043c\u0435\u0449\u0435\u043d \u0432 \u043a\u044d\u0448 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u0438\u043f\u0430 key-value (Dictionary \u043d\u0430 C#). \u041a\u044d\u0448 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 connectionstring. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430 \u043a \u0411\u0414 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043d\u0435\u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430, \u043a\u0440\u043e\u043c\u0435 \u043a\u0430\u043a \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0435\u0448\u0430. \u0422\u0430\u043a \u043c\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u043c\u0430\u0445\u0430 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0447\u0443\u0436\u0443\u044e \u0411\u0414 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e EntityFramework \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u0435\u043b\u0430\u0435\u043c private. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0431\u0430\u0437\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a \u043a\u0430\u043a\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441. \u0410 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043b\u044e\u0431\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d connectionstring (\u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430 GetClientConnectionString), \u0442\u043e \u043d\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u043a\u0443\u0434\u0430 \u043f\u0440\u043e\u043c\u0430\u0445\u043d\u0443\u0442\u044c\u0441\u044f. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 GetClientConnectionString.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f GetClientConnectionString<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public static string GetClientConnectionString(this HttpContext context) {     #if DEBUG      if (Debugger.IsAttached && ConfigurationManager.ConnectionStrings[SERVICE_CONNECTION_STRING_NAME] == null)     { \/*\u0435\u0441\u043b\u0438 \u043c\u044b \u0432 \u0434\u0435\u0431\u0430\u0433\u0435 \u0438 \u043f\u0440\u0438\u0430\u0442\u0442\u0430\u0447\u0435\u043d\u044b \u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u043a\u043e\u043d\u043d\u0435\u043a\u0448\u0438\u043d\u0441\u0442\u0440\u0438\u043d\u0433 \u0434\u043e \u0431\u0430\u0437\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430 (\u0441 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u043e\u043c URL \u0432 connectionstring), \u0442\u043e \u043c\u044b \u0431\u0435\u0440\u0451\u043c \u0438\u043c\u044f \u0431\u0430\u0437\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430 \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0430. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0438\u0434\u0435\u043b \u0432 \u0441\u0432\u043e\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0430\u0437\u0435*\/         return ConfigurationManager.AppSettings[&quot;DeveloperConnection-&quot; + Environment.MachineName];     }     #endif  \/*\u0438\u043d\u043e\u0433\u0434\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441 \u0411\u0414. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0432\u044b\u0442\u044f\u0433\u0438\u0432\u0430\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u0435\u0448, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443 \u0438 \u0442.\u043f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 Task, \u043d\u043e \u0443 \u043d\u0438\u0445 \u043d\u0435\u0442 HttpContext, \u043c\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u043c URL \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u044b\u043b \u043f\u043e\u0434\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441, \u043b\u0438\u0431\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e. \u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u043a \u0442\u0430\u0441\u043a\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 connectionstring, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a \u0434\u0430\u043d\u043d\u044b\u043c. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0438\u0436\u0435.*\/     if(context == null && TaskContext.Current != null)     {         \/\/\u0435\u0441\u043b\u0438 \u043c\u044b \u0432 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u043c \u043f\u043e\u0442\u043e\u043a\u0435, \u0442\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043e \u0441\u0442\u0435\u0439\u0442\u043e\u043c!         return TaskContext.Current.ConnectionString;     }  \/*\u0435\u0441\u043b\u0438 \u043c\u044b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u0442\u043e \u0432\u043e\u0437\u044c\u043c\u0451\u043c connectionstring \u0438\u0437 \u043a\u0435\u0448\u0430*\/     if (context != null && ConfigurationManager.ConnectionStrings[SERVICE_CONNECTION_STRING_NAME] != null)     {         ServiceAccount account = context.GetServiceAccount();         if (account == null)         { \/*\u0435\u0441\u043b\u0438 \u043c\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e, - connectionstring \u0432\u0435\u0440\u043d\u0451\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u043e\u0439, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f*\/             return null;         }         if (account.GetCurrentPurchases().Any() == false)         { \/*\u0435\u0441\u043b\u0438 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0440\u043e\u0447\u0435\u043d\u043e (\u043d\u0435 \u043e\u043f\u043b\u0430\u0447\u0435\u043d\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442), connectionstring \u0432\u0435\u0440\u043d\u0451\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u043e\u0439, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f*\/             return null;         }         return account.ConnectionString;     }     else if (ConfigurationManager.ConnectionStrings[DEFAULT_CONNECTION_STRING_NAME] != null)     { \/*\u0435\u0441\u043b\u0438 \u043c\u044b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u0442\u043e \u0432\u043e\u0437\u044c\u043c\u0451\u043c connectionstring \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0430*\/         return ConfigurationManager.ConnectionStrings[DEFAULT_CONNECTION_STRING_NAME].ConnectionString;     }     else     {         return null;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f GetClientConnectionString (\u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c HttpContext)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">\/*\u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 http:\/\/stackoverflow.com\/a\/32459724*\/  public sealed class TaskContext {     private static readonly string contextKey = Guid.NewGuid().ToString();      public TaskContext(string connectionString)     {         this.ConnectionString = connectionString;     }      public string ConnectionString { get; private set; }      public static TaskContext Current     {         get { return (TaskContext)CallContext.LogicalGetData(contextKey); }         internal set         {             if (value == null)             {                 CallContext.FreeNamedDataSlot(contextKey);             }             else             {                 CallContext.LogicalSetData(contextKey, value);             }         }     } }  public static class TaskFactoryExtensions {     public static Task&lt;T&gt; StartNewWithContext&lt;T&gt;(this TaskFactory factory, Func&lt;T&gt; action, string connectionString)     {         Task&lt;T&gt; task = new Task&lt;T&gt;(() =&gt;         {             T result;             TaskContext.Current = new TaskContext(connectionString);             try             {                 result = action();             }             finally             {                 TaskContext.Current = null;             }             return result;         });          task.Start();          return task;     }      public static Task StartNewWithContext(this TaskFactory factory, Action action, string connectionString)     {         Task task = new Task(() =&gt;         {             TaskContext.Current = new TaskContext(connectionString);             try             {                 action();             }             finally             {                 TaskContext.Current = null;             }         });          task.Start();          return task;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043e\u043d\u0430 \u0432\u044b\u0434\u0430\u0435\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 accessToken. \u0412\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043a\u0440\u043e\u043c\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 login \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e accessToken. \u0414\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0411\u0414, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u043e\u043a\u0435\u043d\u044b \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u0422\u043e\u043a\u0435\u043d\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 GUID, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c login \u0437\u0430\u043d\u043e\u0432\u043e. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u0434\u0431\u043e\u0440 \u0442\u043e\u043a\u0435\u043d\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 \u0411\u0414 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 connectionstring \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c, \u0447\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u0435\u0434\u0438\u043d\u043e\u0439 \u0441\u0443\u043f\u0435\u0440 \u0431\u0430\u0437\u043e\u0439. <\/p>\n<p>  \u041f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a connectionstring \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043a\u043b\u0430\u0441\u0441 AuthHandler: DelegatingHandler. \u0423 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 SendAsync, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 API. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0445\u0435\u0434\u0435\u0440\u0430\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u043b\u0435 accessToken, \u043b\u0438\u0431\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 \u0442\u0430\u043a\u0438\u043c accessToken \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d, \u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u044b\u0434\u0430\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0432\u044b\u0437\u0432\u0430\u0432 \u043c\u0435\u0442\u043e\u0434 API \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f AuthHandler<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class AuthHandler : DelegatingHandler { \tprotected async override Task&lt;HttpResponseMessage&gt; SendAsync(         HttpRequestMessage request, CancellationToken cancellationToken)     {         if (request.Method.Method == &quot;OPTIONS&quot;)         {             var res = base.SendAsync(request, cancellationToken).Result;             return res;         }  \t\/\/\u0438\u0449\u0435\u043c \u0432\u0441\u0435 API \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b         string classSuffix = &quot;Controller&quot;;         var inheritors = Assembly.GetAssembly(typeof(BaseApiController)).GetTypes().Where(t =&gt; t.IsSubclassOf(typeof(ApiController)))             .Where(inheritor =&gt; inheritor.Name.EndsWith(classSuffix)); \t\t\t \t\/\/\u0438\u0449\u0435\u043c \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c UnautorizedMethod. \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 &quot;\u0431\u0435\u043b\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0430\u0439\u043b&quot; (\u043f\u043e GUID \u0444\u0430\u0439\u043b\u0430)         var methods = inheritors.SelectMany(inheritor =&gt; inheritor.GetMethods().Select(methodInfo =&gt; new {             Inheritor = inheritor,             MethodInfo = methodInfo,             Attribute = methodInfo.GetCustomAttribute(typeof(System.Web.Http.ActionNameAttribute)) as System.Web.Http.ActionNameAttribute         })).Where(method =&gt; method.MethodInfo.GetCustomAttribute(typeof(UnautorizedMethodAttribute)) != null);  \t\/\/\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 ConnectionString \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e \u0411\u0414         string connection = System.Web.HttpContext.Current.GetClientConnectionString();         if (string.IsNullOrEmpty(connection))         {             var res = new HttpResponseMessage(System.Net.HttpStatusCode.NotFound);             return res;         }  \t\/\/\u0434\u0435\u043b\u0430\u0435\u043c \u043b\u0438 \u043c\u044b \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043c\u0435\u0442\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e         if (!request.RequestUri.LocalPath.EndsWith(&quot;\/api\/login\/login&quot;) &&              methods.All(method =&gt; !request.RequestUri.LocalPath.ToLower().EndsWith($&quot;\/api\/{method.Inheritor.Name.Substring(0, method.Inheritor.Name.Length - classSuffix.Length)}\/{method.Attribute?.Name ?? method.MethodInfo.Name}&quot;.ToLower())))         {             \/\/\u0435\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 login \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0435\u0437 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u0430 UnautorizedMethod             \/\/\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0440\u043e\u0443\u0442\u043e\u0437\u0430\u0432\u0438\u0441\u0438\u043c, \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e.. \u043d\u043e \u0440\u043e\u0443\u0442\u044b \u043c\u0435\u043d\u044f\u0442\u044c \u0432\u0440\u043e\u0434\u0435 \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f, \u0434\u0430 \u0438 UnautorizedMethod - \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0439.             \/\/\u0432 \u0445\u0443\u0447\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0435\u0442\u043e\u0434 \u043e\u0442\u043f\u0430\u0434\u0451\u0442 \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438             var accessToken = request.GetAccessToken();                          var accountDbWorker = new AccountDbWorker(connection, null, DbWorkerCacheManager.GetCacheProvider(connection));             var checkAccountExists = accountDbWorker.CheckAccountExists(accessToken);             if (checkAccountExists == false)             {                 var res = new HttpResponseMessage(System.Net.HttpStatusCode.Unauthorized);                 return res;             }             else             { \t\t\/\/\u043f\u0440\u043e\u0434\u043b\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 \u0442\u043e\u043a\u0435\u043d\u0430 \u044e\u0437\u0435\u0440\u0430 \u0432 \u043a\u0435\u0448\u0435. \u0440\u0430\u0437 \u0432 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442 \u043a\u0435\u0448 \u0441\u0432\u0430\u043f\u043d\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414                 AuthTokenManager.Instance.Refresh(request.GetTokenHeader());             }         }         else         {             \/\/methods without any auth         }  \t\/\/\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f         var response = await base.SendAsync(request, cancellationToken);         return response;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0434 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u044f\u0434\u0440\u0430 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Data_access_layer\">DAL<\/a>. \u041b\u044e\u0431\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u044f\u0434\u0440\u0430 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435) \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0438\u0449\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e \u0435\u0433\u043e accessToken. \u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0430\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043c\u0435\u0442\u043e\u0434\u0430. \u0422\u0443\u0442 \u0432\u0441\u0451 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e. <\/p>\n<h3>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438<\/h3>\n<p>  \u0422.\u043a. \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0431 \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e. \u041b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u0435\u0435 \u0434\u0435\u043b\u043e \u043e\u0431\u0441\u0442\u043e\u0438\u0442 \u0441 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434 Code First, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0435\u0433\u043e \u0411\u0414 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043a\u0430\u0447\u0435\u043d\u044b \u0432\u0441\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438. <\/p>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0432\u0441\u0435 \u0411\u0414 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043a\u0430\u0447\u0435\u043d\u044b \u0434\u0430\u0436\u0435 \u0440\u0430\u043d\u044c\u0448\u0435 (\u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f). \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430 \u043f\u043e\u0447\u0442\u0443. \u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043f\u0438\u0441\u044c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0441\u043b\u0430\u043d\u044b \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u044e\u0437\u0435\u0440\u0430\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a\u043e \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0411\u0414 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0435\u0441\u0442\u044c \u043b\u0438 \u043f\u0438\u0441\u044c\u043c\u0430 \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443. \u0412 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u043d\u0430 \u0432\u0441\u0435 \u0411\u0414 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<h3>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u0441\u0435\u0439 \u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0430\u043b\u043e \u0442\u043e, \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 IIS \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043d\u0438\u0437\u0438\u043b\u043e\u0441\u044c. \u041d\u0435 \u043c\u043e\u0433\u0443 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0445 \u0446\u0438\u0444\u0440, \u043d\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 4\u0413\u0411 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u044b \u043b\u0435\u0433\u043a\u043e \u0432\u043b\u0435\u0437\u0430\u0435\u0442 \u0441\u043e\u0442\u043d\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 (\u0442.\u0435. \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445), \u0438 \u0435\u0449\u0451 \u0432\u043b\u0435\u0437\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u043f\u0440\u043e\u0441\u0435\u0434\u0430\u0442\u044c \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438. <\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e CPU \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e. \u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 (\u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438) \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0414\u0430\u0436\u0435 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e \u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u0431\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0431\u0430\u0437\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u044d\u0442\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d sql. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 sql \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e. <\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043a\u0430\u043a-\u0442\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0441\u0445\u0435\u043c\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u0442\u0432\u0435\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439. \u0414\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u0411\u0414, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0440\u043e\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0440\u043e\u043b\u0438 \u043d\u0430\u0434\u043e \u0437\u043d\u0430\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c. \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c, \u043d\u0435 \u0431\u0443\u0434\u0443 \u0432\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0442\u0443\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0440\u0430\u0437\u043d\u044b\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445. \u0418 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u044b. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u044b\u043b\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0430 \u0434\u0432\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u0431\u044b\u043b\u043e \u043d\u0435 \u043c\u0430\u043b\u043e. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043b\u044e\u0431\u044b\u0445 \u043f\u0440\u0430\u0432, \u043d\u0443\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435. \u041f\u043e\u0434\u0443\u043c\u0430\u0432, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041d\u043e \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0434\u0435\u0439\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434. \u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043a\u0435\u0448\u0438, \u0447\u0442\u043e \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u043d\u0430\u0431\u043e\u0440\u044b \u043d\u0435\u0441\u0432\u044f\u0437\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e \u0441\u0443\u0442\u0438, \u043e\u043d\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043c\u0430\u043f\u044b (URL -&gt; connectionstring, accessToken -&gt; account + Date). \u0410 \u044d\u0442\u043e\u0442 \u043a\u044d\u0448 \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439, \u0434\u043e\u043b\u0433\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439, \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043b\u043e\u0431, \u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0445\u0438\u0442\u0440\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 (\u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0447\u0435\u0440\u0435\u0437 Dictionary \u043f\u043e \u043a\u043b\u044e\u0447\u0430\u043c), \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e \u0435\u0451 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e. \u0412\u043e \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0442 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 RefreshCache, \u0430 \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u043d\u0435 \u043c\u0430\u043b\u043e. \u0411\u044b\u043b\u043e \u0431\u044b \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0437\u0430\u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434. \u0421\u0430\u043c \u043a\u043e\u0434 RefreshCache \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0432 \u043b\u043e\u0431 \u0442\u043e\u0436\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0443\u0440\u043e\u0432\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u043d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439. \u042d\u0442\u043e \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u0442\u0435\u043c \u0447\u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0438\u0439 Include, \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0411\u0414. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043a\u0443\u0447\u0443 \u043c\u0435\u043b\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0437\u0430\u0442\u0435\u043c \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0442\u044c NavigationProp \u0432 \u043a\u043e\u0434\u0435, \u044d\u0442\u043e \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u0412 \u0438\u0442\u043e\u0433\u0435, \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u0430\u044f \u0433\u043e\u043b\u043e\u0432\u043d\u0430\u044f \u0431\u043e\u043b\u044c: \u0434\u043b\u044f \u0432\u0441\u0435\u0445 CRUD \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c RefreshCache, \u0437\u0430\u043f\u0438\u043b\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0432 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434, \u0437\u0430\u0441\u0443\u043d\u0443\u0442\u044c \u0435\u0451 \u0432\u043e \u0432\u0441\u0435 NavigationProp \u0443 \u0432\u0441\u0435\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439. \u0412\u043e\u043e\u0431\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u043d\u0430\u0441 \u044d\u0442\u043e \u0432\u0441\u0451 \u043d\u0435 \u0440\u0430\u0434\u043e\u0432\u0430\u043b\u043e, \u043d\u043e \u044d\u0442\u043e \u0431\u044b \u043f\u043e\u043c\u043e\u0433\u043b\u043e. <a href=\"https:\/\/ru.wikiquote.org\/wiki\/%D0%AD%D0%BC%D0%B0%D0%BD%D1%83%D1%8D%D0%BB%D1%8C_%D0%9B%D0%B0%D1%81%D0%BA%D0%B5%D1%80\">\u0415\u0441\u043b\u0438 \u0432\u0438\u0434\u0438\u0448\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0445\u043e\u0434 \u2014 \u0438\u0449\u0438 \u0445\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0448\u0435<\/a>.<\/p>\n<p>  \u041c\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u0434\u0432\u0435 \u043d\u0435\u0441\u0432\u044f\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<ul>\n<li>\u0412\u044b\u0437\u043e\u0432 \u043a\u043e\u0434 RefreshCache \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043b\u044e\u0431\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0442\u044b.<\/li>\n<li>\u0413\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0439, \u043f\u043b\u043e\u0445\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0439, \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u0432\u044f\u0437\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043a\u044d\u0448\u0430 \u0432 RefreshCache.<\/li>\n<\/ul>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0438\u043b\u0430\u0441\u044c \u043f\u0443\u0442\u0435\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0432 \u043a\u0438\u0448\u043a\u0438 EntityFramework. \u041c\u044b \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 SaveChanges \u0443 EntityFramework. \u0412\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u043b\u0438 \u043c\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438. \u0415\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u2014 \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u0435\u0448.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0442\u0440\u0435\u0433\u043a\u0438\u043d\u0433\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0443\u0436\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 EntityFramework<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">\/*\u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0442\u0440\u0435\u043a\u0430\u0435\u043c. String[] - \u043f\u043e\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u041d\u0415 \u0442\u0440\u0435\u043a\u0430\u0435\u043c (\u043d\u0435\u0432\u0430\u0436\u043d\u044b\u0435 \u043f\u043e\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f)*\/ static readonly Dictionary&lt;Type, string[]&gt; _trackedTypes = new Dictionary&lt;Type, string[]&gt;() {     { typeof(Account), new string[] { GetPropertyName((Account a) =&gt; a.Settings) } }, \/\/..     { typeof(Table), new string[0] }, };  \/\/\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0438\u0442\u044c static string GetPropertyName&lt;T, P&gt;(Expression&lt;Func&lt;T, P&gt;&gt; action) {     var expression = (MemberExpression)action.Body;     string name = expression.Member.Name;     return name; }  \/*\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u044f \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0438*\/ string[] GetChangedValues(DbEntityEntry entry) {     return entry.CurrentValues             .PropertyNames             .Where(n =&gt; entry.Property(n).IsModified)             .ToArray(); }  \/*\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0438 \u043b\u0438 \u043f\u043e\u043b\u044f \u0432\u043d\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u0435\u0439*\/ bool IsInterestingChange(DbEntityEntry entry) {     Type entityType = ObjectContext.GetObjectType(entry.Entity.GetType());     if (_trackedTypes.Keys.Contains(entityType))     {         switch (entry.State)         {             case System.Data.Entity.EntityState.Added:             case System.Data.Entity.EntityState.Deleted:                 return true;             case System.Data.Entity.EntityState.Detached:             case System.Data.Entity.EntityState.Unchanged:                 return false;             case System.Data.Entity.EntityState.Modified:                 return GetChangedValues(entry).Any(v =&gt; !_trackedTypes[entityType].Contains(v));             default:                 throw new NotImplementedException();         }     }     else         return false; } public override int SaveChanges() {     bool needRefreshCache = ChangeTracker                             .Entries()                             .Any(e =&gt; IsInterestingChange(e));      int answer = base.SaveChanges();      if (needRefreshCache)     {         if (Transaction.Current == null)         {             RefreshCache(null, null);         }         else         {             Transaction.Current.TransactionCompleted -= RefreshCache;             Transaction.Current.TransactionCompleted += RefreshCache;         }     }     return answer; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0430\u043b\u0430\u0441\u044c \u0432 \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430. \u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u043f\u043b\u043e\u0445\u043e\u0439 \u043a\u043e\u0434. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0435\u0442. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e\u0442 \u043a\u043e\u0434, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0430\u0434\u043e \u0447\u0442\u043e \u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043d\u0443\u0436\u043d\u044b\u0445 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445, \u0443 \u043d\u0430\u0441 \u0441\u0432\u0435\u043b\u0441\u044f \u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044e \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0435\u0437 \u0432\u0441\u0435\u0445 Include. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 NavigationProp \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 &#39;\u043f\u043b\u043e\u0445\u043e\u0433\u043e&#39; \u043a\u043e\u0434\u0430 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">\/\/\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 var taskColumns = Task.Factory.StartNewWithContext(() =&gt; { \/*\u0443 \u043d\u0430\u0441 \u0441\u0432\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u0432 isReadOnly \u0440\u0435\u0436\u0438\u043c\u0435 \u043c\u044b \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u0430\u0432\u0442\u043e \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0442\u0440\u0435\u043a\u0438\u043d\u0433 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u0442.\u043f.*\/     using (var entities = new Context(connectionString, isReadOnly: true))     {         return entities.Columns.ToList();     } }, connectionString);  var taskTables = Task.Factory.StartNewWithContext(() =&gt; {     using (var entities = new Context(connectionString, isReadOnly: true ))     {         return entities.Tables.ToList();     } }, connectionString);  var columns = taskColumns.Result; var tables = taskTables.Result;  \/*\u0441\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 Dictionary, \u0447\u0442\u043e\u0431\u044b \u0432 \u0446\u0438\u043a\u043b\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u043c (\u044d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0430\u0435\u0442)*\/ var columnsDictByTableId = columns     .GroupBy(c =&gt; c.TableId)     .ToDictionary(c =&gt; c.Key, c =&gt; c.ToList());  foreach(var table in tables) { \ttable.Columns = columnsDictByTableId[table.Id]; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d \u043f\u043e \u043f\u043e\u0442\u043e\u043a\u0430\u043c. \u042d\u0442\u043e \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043f\u0430\u0440\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432, \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0441\u0443\u0442\u0438 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0438\u0445. \u0414\u0430\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 Ping. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u0420\u043e\u0441\u0442 \u043d\u0435\u043b\u0438\u043d\u0435\u0435\u043d. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044e (\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u0432\u044b\u0448\u0435, \u043d\u043e \u0432 \u0446\u0438\u043a\u043b\u0435 \u043f\u043e \u0432\u0441\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c).<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u044b\u0439 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0449\u0438\u043a<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">\/\/\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 private Task&lt;List&lt;T&gt;&gt; GetEntitiesAsync&lt;T&gt;(string connectionString, Func&lt;SokolDWEntities, List&lt;T&gt;&gt; getter) {     var task = Task.Factory.StartNewWithContext(() =&gt;     {         using (var entities = new SokolDWEntities(connectionString, isReadOnly: true))         {             return getter(entities);         }     }, connectionString);      return task; }  \/\/\/ &lt;summary&gt; \/\/\/ \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \/\/\/ \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0432\u0441\u0435\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0449\u0435\u0442 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 NavigationProp \/\/\/ \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443. \u0412 \u043e\u0431\u0449\u0435\u043c \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e Include \u0432 EF, \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \/\/\/ \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0436\u0435 \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u0442\u044b, \u043c\u044b \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u0432\u0441\u0451 \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e. \/\/\/ \u041c\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0432\u044f\u0437\u0430\u043d\u044b \u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438. \u0412\u0441\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 BaseEntity. \/\/\/ BaseEntity \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u043b\u0435 [Required][Key][DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long Id { get; set; } \/\/\/ \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e Dictionary \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 (\u0447\u0442\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435) \/\/\/ &lt;\/summary&gt; \/\/\/ &lt;param name=&quot;entities&quot;&gt;\u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0434\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439&lt;\/param&gt; private void SetProperties(params object[] entities) { \t\/\/\u0442\u0438\u043f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 -&gt; \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 #entitiesByTypes[typeof(Account)] -&gt; \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432     var entitiesByTypes = new Dictionary&lt;Type, object&gt;(); \t\/\/dictsById[typeof(Account)][1] -&gt; \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 1     var dictsById = new Dictionary&lt;Type, Dictionary&lt;long, BaseEntity&gt;&gt;(); \t\/\/dictsByCustomAttr[typeof(Column)][&quot;TableId&quot;][1] -&gt; \u0432\u0441\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 1     var dictsByCustomAttr = new Dictionary&lt;Type, Dictionary&lt;string, Dictionary&lt;long, object&gt;&gt;&gt;(); \t\/\/pluralFksMetadata[typeof(Table)] \u0434\u043b\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 Table \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0421\u0432\u043e\u0439\u0441\u0442\u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a     var pluralFksMetadata = new Dictionary&lt;Type, Dictionary&lt;PropertyInfo, ForeignKeyAttribute&gt;&gt;(); \t\/\/needGroupByPropList[typeof(Column)] \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c Dictionary (\u043f\u043e \u043d\u0438\u043c \u0438\u0434\u0451\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c)     var needGroupByPropList = new Dictionary&lt;Type, List&lt;string&gt;&gt;();      \/\/\u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c entitiesByTypes \u0438 dictsById     foreach (var entitySetObject in entities)     {         var listType = entitySetObject.GetType();         if (listType.IsGenericType && (listType.GetGenericTypeDefinition() == typeof(List&lt;&gt;)))         {             Type entityType = listType.GetGenericArguments().Single();             entitiesByTypes.Add(entityType, entitySetObject);              if (typeof(BaseEntity).IsAssignableFrom(entityType))             {                 \/\/dictsById \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f BaseEntity (\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0442\u0430\u043a\u0438\u0435 \u0441\u0443\u0449\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f)                 var entitySetList = entitySetObject as IEnumerable&lt;BaseEntity&gt;;                 var dictById = entitySetList.ToDictionary(o =&gt; o.Id);                 dictsById.Add(entityType, dictById);             }         }         else         {             throw new ArgumentException();         }     }      \/\/\u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c pluralFksMetadata \u0438 needGroupByPropList     foreach (var entitySet in entitiesByTypes)     {         Type entityType = entitySet.Key;         var virtualProps = entityType             .GetProperties()             .Where(p =&gt; p.GetCustomAttributes(true).Any(attr =&gt; attr.GetType() == typeof(ForeignKeyAttribute)))             .Where(p =&gt; p.GetGetMethod().IsVirtual)             .ToList();          \/\/\u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 NavigationProp         var pluralFKs = virtualProps             .Where(p =&gt; typeof(IEnumerable).IsAssignableFrom(p.PropertyType))             .Where(p =&gt; entitiesByTypes.Keys.Contains(p.PropertyType.GetGenericArguments().Single()))             .ToDictionary(p =&gt; p, p =&gt; (p.GetCustomAttributes(true).Single(attr =&gt; attr.GetType() == typeof(ForeignKeyAttribute)) as ForeignKeyAttribute));         pluralFksMetadata.Add(entityType, pluralFKs);         foreach (var pluralFK in pluralFKs)         {             Type pluralPropertyType = pluralFK.Key.PropertyType.GetGenericArguments().Single();             if (!needGroupByPropList.ContainsKey(pluralPropertyType))             {                 needGroupByPropList.Add(pluralPropertyType, new List&lt;string&gt;());             }             if (!needGroupByPropList[pluralPropertyType].Contains(pluralFK.Value.Name))             {                 needGroupByPropList[pluralPropertyType].Add(pluralFK.Value.Name);             }         }          \/\/\u043f\u0440\u044f\u043c\u044b\u0435 NavigationProp         var singularFKsDictWithAttribute = virtualProps             .Where(p =&gt; entitiesByTypes.Keys.Contains(p.PropertyType))             .ToDictionary(p =&gt; p, p =&gt; entityType.GetProperty((p.GetCustomAttributes(true).Single(attr =&gt; attr.GetType() == typeof(ForeignKeyAttribute)) as ForeignKeyAttribute).Name));          var entitySetList = entitySet.Value as IEnumerable&lt;object&gt;; \t\t\/\/\u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u044f\u043c\u044b\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 (NavigationProp)         foreach (var entity in entitySetList)         {             foreach (var singularFK in singularFKsDictWithAttribute)             {                 var dictById = dictsById[singularFK.Key.PropertyType];                 long? value = (long?)singularFK.Value.GetValue(entity);                 if (value.HasValue && dictById.ContainsKey(value.Value))                 {                     singularFK.Key.SetValue(entity, dictById[value.Value]);                 }             }         }     }      MethodInfo castMethod = typeof(Enumerable).GetMethod(&quot;Cast&quot;);     MethodInfo toListMethod = typeof(Enumerable).GetMethod(&quot;ToList&quot;);      \/\/\u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c dictsByCustomAttr     foreach (var needGroupByPropType in needGroupByPropList)     {         var entityList = entitiesByTypes[needGroupByPropType.Key] as IEnumerable&lt;object&gt;;         foreach (var propName in needGroupByPropType.Value)         {             var prop = needGroupByPropType.Key.GetProperty(propName);             var groupPropValues = entityList                 .ToDictionary(e =&gt; e, e =&gt; (long?)prop.GetValue(e));              var castMethodSpecific = castMethod.MakeGenericMethod(new Type[] { needGroupByPropType.Key });             var toListMethodSpecific = toListMethod.MakeGenericMethod(new Type[] { needGroupByPropType.Key });              var groupByValues = entityList                 .GroupBy(e =&gt; groupPropValues[e], e =&gt; e)                 .Where(e =&gt; e.Key != null)                 .ToDictionary(e =&gt; e.Key.Value, e =&gt; toListMethodSpecific.Invoke(null, new object[] { castMethodSpecific.Invoke(null, new object[] { e }) }));             if (!dictsByCustomAttr.ContainsKey(needGroupByPropType.Key))             {                 dictsByCustomAttr.Add(needGroupByPropType.Key, new Dictionary&lt;string, Dictionary&lt;long, object&gt;&gt;());             }             dictsByCustomAttr[needGroupByPropType.Key].Add(propName, groupByValues);         }     }      \/\/\u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 (NavigationProp)     foreach (var pluralFkMetadata in pluralFksMetadata)     {         if (!dictsById.ContainsKey(pluralFkMetadata.Key))             continue;         var entityList = entitiesByTypes[pluralFkMetadata.Key] as IEnumerable&lt;object&gt;;         foreach (var entity in entityList)         {             var baseEntity = (BaseEntity)entity;             foreach (var fkProp in pluralFkMetadata.Value)             {                 var dictByCustomAttr = dictsByCustomAttr[fkProp.Key.PropertyType.GetGenericArguments().Single()];                 if (dictByCustomAttr.ContainsKey(fkProp.Value.Name))                 {                     if(dictByCustomAttr[fkProp.Value.Name].ContainsKey(baseEntity.Id))                     fkProp.Key.SetValue(entity, dictByCustomAttr[fkProp.Value.Name][baseEntity.Id]);                 }             }         }     } }  \/\/Without locking private DbWorkerCacheData RefreshNotSafe(string connectionString) {     GlobalHost.ConnectionManager.GetHubContext&lt;AdminHub&gt;().Clients.All.cacheRefreshStart();      \/\/get data parallel     var accountsTask = GetEntitiesAsync(connectionString, e =&gt; e.Accounts.ToList()); \t\/\/.. \tvar tablesTask = GetEntitiesAsync(connectionString, e =&gt; e.Tables.ToList());      \/\/wait data     var accounts = accountsTask.Result; \t\/\/.. \tvar tables = tablesTask.Result; \t \tDAL.DbWorkers.Code.Extensions.SetProperties     (         accounts, \/*..*\/ tables     ); \t \t\/*\u0442\u0443\u0442 \u0443\u0436\u0435 \u0438\u0437 \u043a\u0435\u0448\u0430 \u0441\u0442\u0440\u043e\u0438\u043c &quot;\u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u0435\u0448&quot;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430 O(1) \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435*\/ } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0433\u0438\u0431\u043a\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f RefreshCache \u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0411\u0414, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c (600+ \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, 100+ \u0440\u043e\u043b\u0435\u0439), \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 10 \u0441\u0435\u043a\u0443\u043d\u0434. \u041f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u2014 11.5 \u0441\u0435\u043a\u0443\u043d\u0434. \u041f\u043e \u0441\u0443\u0442\u0438 \u0432\u0441\u0451 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043f\u043e\u043b\u044f\u043c \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044e, \u043d\u043e \u043f\u0440\u0438\u043e\u0441\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435\u0432\u0435\u043b\u0438\u043a. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u043b\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 NavigationProp \u0443 \u0432\u0441\u0435\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u0430 \u0440\u0430\u043d\u044c\u0448\u0435 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c table.Columns.First().Table.Columns\u2026 \u0422.\u0435. \u0412\u0441\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0435 \u043e\u043f\u0430\u0441\u0430\u044f\u0441\u044c \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e\u0433\u043e NullReferenceException.<\/p>\n<p>  \u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435 \u043a\u044d\u0448\u0430 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 CPU \u0441\u0442\u0430\u043b\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430. \u0414\u0430\u0436\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u044f\u0434\u0435\u0440\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0432\u0441\u0451 \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043e\u0442\u0435\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043d\u0430 CPU. <\/p>\n<h3>\u0421\u043e\u0445\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>  \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u043e\u043b\u0435\u0435 \u043e\u0441\u0442\u0440\u043e \u0432\u0441\u0442\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0438 \u043a\u043e\u0440\u043e\u0431\u043e\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u043e\u0442\u0434\u0430\u0432\u0430\u043b\u0438 bin), \u0442\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e. \u0423 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0441\u0442\u043e\u044f\u043b\u0438 \u0441\u0432\u043e\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441\u0432\u043e\u0438 \u0430\u0434\u043c\u0438\u043d\u044b, \u0441\u0432\u043e\u0438 \u0431\u0435\u043a\u0430\u043f\u044b. <\/p>\n<p>  \u0412 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u044b \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u043e\u0438\u0442\u0441\u044f \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c. \u042d\u0442\u043e \u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u043e\u0434\u0438\u0442, \u0438 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u0442. \u0418 \u0442\u043e \u0438 \u0434\u0440\u0443\u0433\u043e\u0435 \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0432 Amazon S3. \u0424\u0430\u0439\u043b\u044b \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0442\u0430\u043c, \u0437\u0430\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0443\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440, \u043d\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0434\u0438\u0441\u043a\u0435. \u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b, \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0430\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0438\u0437 Amazon \u0438 \u043e\u0442\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0443. \u041a\u0430\u0436\u0434\u0443\u044e \u043d\u043e\u0447\u044c \u0431\u0435\u043a\u0430\u043f\u044b \u0432\u0441\u0435\u0445 \u043e\u043f\u043b\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0411\u0414 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0432 Amazon. \u0420\u0430\u0437 \u0432 \u043c\u0435\u0441\u044f\u0446 \u044f \u0441\u0430\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044e \u0432\u0441\u0435 \u0431\u0435\u043a\u0430\u043f\u044b \u0411\u0414 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443. <\/p>\n<p>  \u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u0442\u0435\u0440\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u043f\u0440\u0438 \u0438\u0445 \u0443\u0442\u0435\u0440\u0435 \u0432 Amazon S3. \u0414\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0431\u0430\u0437\u044b \u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u043f\u0430\u0441\u0442\u044c \u0438\u0437 Amazon S3, \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043c\u043e\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. <\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b<\/h3>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439, \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u043d\u0430\u0448\u0438\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 (\u0434\u0430\u0436\u0435 \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f) \u0431\u0435\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432. \u0421\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u0442\u0430\u043b\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0443\u0434\u0435\u0448\u0435\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<h3>\u0417\u0430\u0447\u0435\u043c \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442<\/h3>\n<p>  \u042d\u0442\u043e \u0441\u0430\u043c\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043b\u0438\u0447\u043d\u043e \u044f \u043a\u043e\u0433\u0434\u0430 \u043b\u0438\u0431\u043e \u0434\u0435\u043b\u0430\u043b. \u0417\u0434\u0435\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u043d \u043b\u0438\u0448\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u043d\u043e \u0432\u0430\u0436\u043d\u044b\u0439 \u0435\u0435 \u0430\u0441\u043f\u0435\u043a\u0442 (\u0448\u0430\u0440\u0438\u043d\u0433 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439). \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u043b\u0438\u043a\u0430 \u0438 \u043c\u043d\u043e\u0433\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u043f\u043e\u043c\u043e\u0433\u043b\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043e\u0441\u043e\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443. \u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u0442\u0435\u043c, \u043a\u0442\u043e \u0434\u0443\u043c\u0430\u0435\u0442 \u043e\u0431\u043e\u0431\u0449\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041f\u043e\u043b\u0430\u0433\u0430\u044e \u0447\u0442\u043e \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0442\u043e \u0442\u043e \u043f\u043e\u043a\u0440\u0438\u0442\u0438\u043a\u0443\u0435\u0442 \u0447\u0430\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0447\u0442\u043e \u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435\/\u0431\u044b\u0441\u0442\u0440\u043e\u0435\/\u0433\u0438\u0431\u043a\u043e\u0435. \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0441 \u0441\u0438\u043b\u044c\u043d\u0435\u0435. \u041d\u0443 \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u043e \u043d\u0430\u0441 \u0443\u0441\u043b\u044b\u0448\u0430\u043b\u0438. \u0412\u0434\u0440\u0443\u0433, \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430, \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0439\u0442\u0438 \u043a \u043d\u0430\u043c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043d\u0435\u0451. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0430\u0440\u0442\u043d\u0435\u0440\u0441\u043a\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438 \u0418\u0422-\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0442\u043e\u0440\u043e\u0432 (\u0432 \u043c\u043e\u0451\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u0441\u0430\u0439\u0442 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438). \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0431\u044b\u043b \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0434\u0440\u0443\u0433\u0438\u043c.<\/p>\n<h3>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439<\/h3>\n<p>  <\/p>\n<ol>\n<li>\u041d\u0435 \u043d\u0430\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439.<\/li>\n<li>\u041f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 accessToken).<\/li>\n<li>\u041a\u0430\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0439 (\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0435).<\/li>\n<li>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 Zoho Creator.<\/li>\n<li>\u0412\u0430\u0448\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/li>\n<\/ol>\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=\"https:\/\/habrahabr.ru\/post\/327240\/\"> https:\/\/habrahabr.ru\/post\/327240\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0443\u0447\u0435\u0442\u043d\u043e-\u043e\u0442\u0447\u0435\u0442\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u0435\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0443\u0447\u0451\u0442\u043d\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e \u201c\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439\u201d \u043b\u043e\u0433\u0438\u043a\u043e\u0439. \u041f\u043e\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0432\u0438\u0434\u0443 \u0442\u043e, \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u0432\u0438\u0434\u0435 \u0431\u0430\u043d\u0430\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0440\u043e\u0432\u043d\u043e \u0442\u043e, \u043e \u0447\u0451\u043c \u0432\u044b \u043f\u043e\u0434\u0443\u043c\u0430\u043b\u0438. \u0425\u043e\u0442\u044f \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438, \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f JavaScript (client side, server side), SQL (\u0438 \u0432\u043e\u0442 \u0442\u043e\u0433\u0434\u0430 \u0443\u0436\u0435 \u044d\u0442\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c). <\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0432\u043e\u043f\u0440\u043e\u0441\u044b:<\/p>\n<ul>\n<li>\u0412\u044b\u0431\u043e\u0440\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u0422\u043e\u0447\u043d\u0435\u0435 \u0448\u0430\u0440\u0434\u0438\u043d\u0433 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0431\u0434 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438.<\/li>\n<li>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0422.\u0435. \u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043a \u0447\u0435\u043c\u0443 \u043e\u043d \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f. \u041a\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b.<\/li>\n<li>\u201c\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f\u201d \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 (\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u0438 \u0432\u0441\u0451 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u043e\u0439) \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/li>\n<li>\u0421\u043e\u0445\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/li>\n<\/ul>\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-285429","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285429","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=285429"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285429\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=285429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=285429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=285429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}