{"id":320538,"date":"2021-03-30T15:01:25","date_gmt":"2021-03-30T15:01:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320538"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320538","title":{"rendered":"\u0420\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 EF Core"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p>ORM Entity Framework Core \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u0441\u0435 \u0431\u043e\u043b\u0435\u0435 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0431\u043e\u0433\u0430\u0442\u043e\u0439 \u043d\u0430 \u0444\u0438\u0447\u0438. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0442\u0440\u0430\u0442\u0438\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043f\u0435\u0440\u0444\u043e\u043c\u0430\u043d\u0441 \u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 Nuget-\u043f\u0430\u043a\u0435\u0442\u0430 \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0441\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438. \u041d\u043e \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0444\u0438\u0447\u0435: \u044d\u0442\u043e \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u2014 &quot;\u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b&quot; \u0438\u043b\u0438 &quot;split queries&quot; \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h1 id=\"predystoriya\">\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u041d\u0430 \u043c\u043e\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Postgres, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 <code>Npgsql<\/code> \u0438 EF Core. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u0441\u0435\u0433\u043e \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f &quot;\u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u041f\u0426\u0420-\u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f&quot;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u0446\u0435\u043f\u0442 \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0440\u0435\u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c &quot;\u0440\u0435\u0446\u0435\u043f\u0442\u0430 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f&quot;<\/li>\n<li>\u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b<\/li>\n<li>\u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<li>\u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u0432\u0441\u0435\u0433\u043e 8 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438 \u0442\u043e\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u043e\u043a\u043e\u043b\u043e \u0434\u044e\u0436\u0438\u043d\u044b \u043f\u043e\u043b\u0435\u0439, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0432\u0435\u0440\u0441\u0438\u044f, \u0438 \u0442.\u0434.<br \/>  \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0432\u044f\u0437\u044f\u043c\u0438 \u043c\u043d\u043e\u0433\u043e-\u043a\u043e-\u043c\u043d\u043e\u0433\u0438\u043c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u043c\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043d\u0443 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e \u043f\u043e\u043b\u0443\u0434\u044e\u0436\u0438\u043d\u044b \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u044b \u043d\u0435 \u043f\u0430\u0440\u0438\u043b\u0438 \u0441\u0435\u0431\u0435 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438 \u0441\u0442\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c lazy-loading, \u0447\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445 &quot;\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f&quot;: \u043a\u043e\u0433\u0434\u0430 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u043b\u0430\u0441\u044c \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0440\u0435\u0430\u0433\u0435\u043d\u0442\u043e\u0432, \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.<br \/>  \u041d\u043e \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0443 &quot;\u0446\u0435\u043b\u0438\u043a\u043e\u043c&quot;, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 N+1, \u043a\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f 1 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u0435\u0449\u0435 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438.<br \/>  \u0422\u0430\u043a\u043e\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0430\u0436\u0438\u0432\u0430\u043b\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0432\u0438\u0442\u043a\u043e\u043c \u0431\u044b\u043b\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>LINQ<\/code>-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 <code>.Include().ThenInclude()<\/code>. <\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043d\u0435\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f <strong>\u0446\u0430\u0440\u044c-\u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438<\/strong>. \u042d\u0442\u043e \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0439 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0442\u0435\u0441\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0440\u0435\u0430\u0433\u0435\u043d\u0442\u043e\u0432, \u043c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0434\u0435\u0442\u0435\u043a\u0446\u0438\u0438. \u041a \u043d\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0430\u0446\u0438\u0438 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0440\u0435\u0430\u0433\u0435\u043d\u0442\u043e\u0432.<br \/>  \u0422\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u0437\u0432\u0435\u0441\u0438\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u0430\u0436\u0434\u0430\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0438\u043c\u0435\u043b\u0430 \u043d\u0435 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e 3-5 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0430 \u043f\u043e 20-30. \u0412\u043e\u0442 \u0442\u0443\u0442 \u043d\u0430\u0448 \u0441\u043e\u0444\u0442 \u0438 \u0441\u043a\u0430\u0437\u0430\u043b <em>&quot;\u043a\u0440\u044f&quot;<\/em>.<br \/>  \u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0430 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0443\u0445\u043e\u0434\u0438\u043b\u043e \u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043e \u0441\u043e\u0442\u0435\u043d, \u0442\u043e \u0443 <strong>\u0446\u0430\u0440\u044c-\u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438<\/strong> \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u043e \u0434\u043e <strong>\u043f\u043e\u043b\u0443\u0442\u043e\u0440\u0430 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0441\u0435\u043a\u0443\u043d\u0434<\/strong>, \u0447\u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e \u043a \u043a\u0440\u0430\u0445\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0411\u0414. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0443\u0436\u0435 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<h1 id=\"pereskaz-dokumentacii\">\u041f\u0435\u0440\u0435\u0441\u043a\u0430\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/h1>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043f\u0438\u0448\u0443\u0442 \u041c\u0430\u0439\u043a\u0440\u043e\u0441\u043e\u0444\u0442 \u0432 <a href=\"https:\/\/docs.microsoft.com\/ru-ru\/ef\/core\/querying\/single-split-queries\" rel=\"nofollow noopener noreferrer\">\u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/a> \u043e\u0431\u044b\u0447\u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 LINQ-\u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d SQL \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c JOIN \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439.<br \/>  \u042f \u043f\u043e\u0437\u0432\u043e\u043b\u044e \u0441\u0435\u0431\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043d\u0435 \u0431\u043b\u043e\u0433\u0438 \u0438 \u043f\u043e\u0441\u0442\u044b, \u0430 \u043f\u043e\u0441\u0442\u044b \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u044b. \u041f\u0443\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">public class Post  {     public int ID { get; set; }     public string Content { get; set; }     public List&lt;Comment&gt; Comments { get; set; } } public class Comment  {     public int ID { get; set; }     public Post ParentPost { get; set; }     public int ParentPostID { get; set; }     public string CommentText { get; set; } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0445\u0430\u0439\u043f\u043e\u0432\u044b\u0439 \u043f\u043e\u0441\u0442 \u0441 1000 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438 \u0438\u0437 \u0431\u0434 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">var veryPopularPost = Posts     .Include(x =&gt; x.Comments)     .First(x =&gt; x.ID == 42);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u0439 SQL-\u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0441\u0440\u0435\u0434\u043d\u0451\u043d\u043d\u044b\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u043c\u0430\u0441\u0441\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"sql\">SELECT p.id, p.content, c.id, c.parentpostid, c.commenttext  FROM posts AS p  LEFT JOIN comments AS c ON (p.id = c.parentpostid) WHERE p.id = 42 LIMIT 1;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0430\u0432\u0442\u043e\u0440 \u0431\u044b\u043b \u0432 \u0443\u0434\u0430\u0440\u0435 \u0438 \u0432\u044b\u0434\u0430\u043b 100 \u041a\u0411 \u0442\u0435\u043a\u0441\u0442\u0430 (\u044d\u0442\u043e \u043e\u043a\u043e\u043b\u043e 50 \u043f\u0435\u0447\u0430\u0442\u043d\u044b\u0445 \u043b\u0438\u0441\u0442\u043e\u0432). \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0442\u043e\u0440\u044b \u0447\u0438\u0442\u0430\u043b\u0438, \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u043b\u0438\u0441\u044c \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 1000 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432. \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u0442\u044c ORM?<br \/>  \u041d\u0430 \u0432\u0441\u043a\u0438\u0434\u043a\u0443 \u2014 <code>p.content<\/code> = 100 \u041a\u0411, \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c 1000 \u0440\u0430\u0437 \u0438 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 ~ 100 \u041c\u0411 \u0442\u0435\u043a\u0441\u0442\u0430, \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e\u0441\u044f 1000 \u0440\u0430\u0437. \u0418 \u044d\u0442\u043e \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 <code>int<\/code> \u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432.<\/p>\n<p>  <\/p>\n<p>Lazy-load \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0445\u043e\u0442\u044f \u0431\u043e\u043c\u0431\u0438\u0442\u044c \u0431\u0430\u0437\u0443 <strong>1000 \u0438 \u043e\u0434\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c<\/strong> \u2014 \u0442\u043e\u0436\u0435 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435. \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0441 \u044d\u0442\u0438\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043a \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432? <\/p>\n<p>  <\/p>\n<h2 id=\"assplitquery\">AsSplitQuery()<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430, \u0438 \u0432\u043e\u0442 \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0412 EF Core 5.0 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u043e\u0432\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>.AsSplitQuery()<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 query provider \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">var veryPopularPost = Posts     .Include(x =&gt; x.Comments)     .AsSplitQuery()     .First(x =&gt; x.ID == 42);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"sql\">SELECT p.id, p.content  FROM posts AS p WHERE p.id = 42 LIMIT 1;  SELECT c.id, c.parentpostid, c.commenttext, p.id FROM posts AS p INNER JOIN comments AS c ON (p.id = c.parentpostid) WHERE p.id = 42 LIMIT 1;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f 1000 \u0440\u0430\u0437, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e 1.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435, \u0447\u0442\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442 \u043e\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0432\u0437\u0440\u044b\u0432\u0430. <\/p>\n<p>  <\/p>\n<h1 id=\"benchmarki\">\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438<\/h1>\n<p>  <\/p>\n<p>\u041d\u0430 \u0441\u043a\u043e\u0440\u0443\u044e \u0440\u0443\u043a\u0443 \u044f \u0441\u0432\u0430\u044f\u043b \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a. \u041f\u0443\u0441\u0442\u044c \u0435\u0441\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0442\u0438\u043f\u0430 <code>MainEntity<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e, \u043a\u0440\u043e\u043c\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439. 5 &quot;\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445&quot; \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438 1 \u0431\u043e\u043b\u044c\u0448\u0430\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">public class MainEntity {     public int ID { get; set; }     public List&lt;RefEntity1&gt; Ref1 { get; set; }     public List&lt;RefEntity2&gt; Ref2 { get; set; }     public List&lt;RefEntity3&gt; Ref3 { get; set; }     public List&lt;RefEntity4&gt; Ref4 { get; set; }     public List&lt;RefEntity5&gt; Ref5 { get; set; }     public List&lt;BigRefEntity&gt; BigRef { get; set; } }  public abstract class RefEntity {     public int ID { get; set; }     public string Payload { get; set; } = string.Empty;      public MainEntity MainEntity { get; set; }     public int? MainEntityID { get; set; } }  public class RefEntity1 : RefEntity { } public class RefEntity2 : RefEntity { } public class RefEntity3 : RefEntity { } public class RefEntity4 : RefEntity { } public class RefEntity5 : RefEntity { } public class BigRefEntity : RefEntity { }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0438\u0441\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0411\u0414 \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u043c\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u043f\u043e 10 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0434\u043b\u044f &quot;\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439&quot; \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u043f\u043e 1000 \u0434\u043b\u044f &quot;\u0431\u043e\u043b\u044c\u0448\u043e\u0439&quot;.<br \/>  \u0412 \u043a\u0430\u0436\u0434\u0443\u044e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e <code>ItemsInCollection<\/code> \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043f\u043e 2 \u0437\u0430\u043f\u0438\u0441\u0438 <code>MainEntity<\/code>, \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044f \u043a \u043d\u0435\u0439 \u043e\u0442 0 \u0434\u043e 6 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>LoadRefs<\/code>) \u0432 \u0434\u0432\u0443\u0445 \u0440\u0435\u0436\u0438\u043c\u0430\u0445 \u2014 \u043e\u0434\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>SplitQueries<\/code>).<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">[Benchmark] public List&lt;MainEntity&gt; QueryLoad() {     IQueryable&lt;MainEntity&gt; query = LoadRefs switch     {         0 =&gt; dbContext.MainEntities,         1 =&gt; dbContext.MainEntities             .Include(x =&gt; x.Ref1),         2 =&gt; dbContext.MainEntities             .Include(x =&gt; x.Ref1)             .Include(x =&gt; x.Ref2),         3 =&gt; dbContext.MainEntities             .Include(x =&gt; x.Ref1)             .Include(x =&gt; x.Ref2)             .Include(x =&gt; x.Ref3),         4 =&gt; dbContext.MainEntities             .Include(x =&gt; x.Ref1)             .Include(x =&gt; x.Ref2)             .Include(x =&gt; x.Ref3)             .Include(x =&gt; x.Ref4),         5 =&gt; dbContext.MainEntities             .Include(x =&gt; x.Ref1)             .Include(x =&gt; x.Ref2)             .Include(x =&gt; x.Ref3)             .Include(x =&gt; x.Ref4)             .Include(x =&gt; x.Ref5),         6 =&gt; dbContext.MainEntities             .Include(x =&gt; x.Ref1)             .Include(x =&gt; x.Ref2)             .Include(x =&gt; x.Ref3)             .Include(x =&gt; x.Ref4)             .Include(x =&gt; x.Ref5)             .Include(x =&gt; x.BigRef),         _ =&gt; throw new ArgumentOutOfRangeException()     };     var splitQuery = SplitQueries ? query.AsSplitQuery() : query;     return splitQuery.Take(2).ToList(); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/zetroot\/CartesianExplosion\" rel=\"nofollow noopener noreferrer\">\u0433\u0438\u0442\u0445\u0430\u0431\u0435<\/a>.<\/p>\n<p>  <\/p>\n<p>\u042f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a \u043d\u0430 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0421\u0423\u0411\u0414 \u0432 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0435\u0440\u0435\u0437 localhost.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042 AMD Ryzen 5 2400G with Radeon Vega Graphics, 1 CPU, 8 logical and 4 physical cores .NET Core SDK=5.0.201   [Host]     : .NET Core 5.0.4 (CoreCLR 5.0.421.11614, CoreFX 5.0.421.11614), X64 RyuJIT  [AttachedDebugger]   Job-HMJXLI : .NET Core 5.0.4 (CoreCLR 5.0.421.11614, CoreFX 5.0.421.11614), X64 RyuJIT  InvocationCount=1  UnrollFactor=1   <\/code><\/pre>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>ItemsInCollection<\/th>\n<th>SplitQueries<\/th>\n<th>LoadRefs<\/th>\n<th>Mean<\/th>\n<th>Error<\/th>\n<th>StdDev<\/th>\n<th>Median<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>2<\/td>\n<td>False<\/td>\n<td>0<\/td>\n<td>694.6 \u03bcs<\/td>\n<td>18.42 \u03bcs<\/td>\n<td>52.57 \u03bcs<\/td>\n<td>686.9 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>False<\/td>\n<td>1<\/td>\n<td>1,004.3 \u03bcs<\/td>\n<td>25.43 \u03bcs<\/td>\n<td>69.60 \u03bcs<\/td>\n<td>983.4 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>False<\/td>\n<td>2<\/td>\n<td>1,255.3 \u03bcs<\/td>\n<td>32.02 \u03bcs<\/td>\n<td>89.25 \u03bcs<\/td>\n<td>1,237.0 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>False<\/td>\n<td>3<\/td>\n<td>1,578.9 \u03bcs<\/td>\n<td>45.46 \u03bcs<\/td>\n<td>126.73 \u03bcs<\/td>\n<td>1,545.1 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>False<\/td>\n<td>4<\/td>\n<td>2,013.3 \u03bcs<\/td>\n<td>56.55 \u03bcs<\/td>\n<td>162.26 \u03bcs<\/td>\n<td>1,976.8 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>False<\/td>\n<td>5<\/td>\n<td>2,685.2 \u03bcs<\/td>\n<td>69.00 \u03bcs<\/td>\n<td>196.85 \u03bcs<\/td>\n<td>2,651.1 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>False<\/td>\n<td>6<\/td>\n<td>4,646.8 \u03bcs<\/td>\n<td>134.52 \u03bcs<\/td>\n<td>392.41 \u03bcs<\/td>\n<td>4,515.2 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>True<\/td>\n<td>0<\/td>\n<td>726.5 \u03bcs<\/td>\n<td>17.60 \u03bcs<\/td>\n<td>48.76 \u03bcs<\/td>\n<td>725.0 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>True<\/td>\n<td>1<\/td>\n<td>1,403.1 \u03bcs<\/td>\n<td>34.46 \u03bcs<\/td>\n<td>96.06 \u03bcs<\/td>\n<td>1,394.3 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>True<\/td>\n<td>2<\/td>\n<td>1,928.7 \u03bcs<\/td>\n<td>57.68 \u03bcs<\/td>\n<td>165.51 \u03bcs<\/td>\n<td>1,923.3 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>True<\/td>\n<td>3<\/td>\n<td>2,639.6 \u03bcs<\/td>\n<td>96.20 \u03bcs<\/td>\n<td>277.56 \u03bcs<\/td>\n<td>2,584.5 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>True<\/td>\n<td>4<\/td>\n<td>3,128.8 \u03bcs<\/td>\n<td>117.46 \u03bcs<\/td>\n<td>340.77 \u03bcs<\/td>\n<td>3,180.4 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>True<\/td>\n<td>5<\/td>\n<td>3,725.9 \u03bcs<\/td>\n<td>121.37 \u03bcs<\/td>\n<td>357.87 \u03bcs<\/td>\n<td>3,713.8 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>True<\/td>\n<td>6<\/td>\n<td>4,299.9 \u03bcs<\/td>\n<td>166.28 \u03bcs<\/td>\n<td>485.04 \u03bcs<\/td>\n<td>4,233.4 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>False<\/td>\n<td>0<\/td>\n<td>706.6 \u03bcs<\/td>\n<td>18.03 \u03bcs<\/td>\n<td>50.25 \u03bcs<\/td>\n<td>698.9 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>False<\/td>\n<td>1<\/td>\n<td>1,071.6 \u03bcs<\/td>\n<td>20.91 \u03bcs<\/td>\n<td>51.69 \u03bcs<\/td>\n<td>1,068.6 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>False<\/td>\n<td>2<\/td>\n<td>1,512.7 \u03bcs<\/td>\n<td>30.13 \u03bcs<\/td>\n<td>54.33 \u03bcs<\/td>\n<td>1,513.6 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>False<\/td>\n<td>3<\/td>\n<td>2,809.9 \u03bcs<\/td>\n<td>148.44 \u03bcs<\/td>\n<td>435.35 \u03bcs<\/td>\n<td>2,619.9 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>False<\/td>\n<td>4<\/td>\n<td>7,803.3 \u03bcs<\/td>\n<td>435.35 \u03bcs<\/td>\n<td>1,242.08 \u03bcs<\/td>\n<td>7,243.8 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>False<\/td>\n<td>5<\/td>\n<td>37,752.4 \u03bcs<\/td>\n<td>439.33 \u03bcs<\/td>\n<td>366.86 \u03bcs<\/td>\n<td>37,791.4 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>False<\/td>\n<td>6<\/td>\n<td>321,948.5 \u03bcs<\/td>\n<td>3,336.86 \u03bcs<\/td>\n<td>2,605.20 \u03bcs<\/td>\n<td>321,361.0 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>True<\/td>\n<td>0<\/td>\n<td>714.0 \u03bcs<\/td>\n<td>12.87 \u03bcs<\/td>\n<td>11.41 \u03bcs<\/td>\n<td>715.7 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>True<\/td>\n<td>1<\/td>\n<td>1,436.5 \u03bcs<\/td>\n<td>33.54 \u03bcs<\/td>\n<td>92.37 \u03bcs<\/td>\n<td>1,418.8 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>True<\/td>\n<td>2<\/td>\n<td>2,233.7 \u03bcs<\/td>\n<td>79.47 \u03bcs<\/td>\n<td>230.55 \u03bcs<\/td>\n<td>2,232.8 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>True<\/td>\n<td>3<\/td>\n<td>3,056.3 \u03bcs<\/td>\n<td>166.89 \u03bcs<\/td>\n<td>476.15 \u03bcs<\/td>\n<td>3,051.3 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>True<\/td>\n<td>4<\/td>\n<td>3,339.3 \u03bcs<\/td>\n<td>105.32 \u03bcs<\/td>\n<td>303.88 \u03bcs<\/td>\n<td>3,340.5 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>True<\/td>\n<td>5<\/td>\n<td>3,962.7 \u03bcs<\/td>\n<td>179.15 \u03bcs<\/td>\n<td>508.21 \u03bcs<\/td>\n<td>3,862.4 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>True<\/td>\n<td>6<\/td>\n<td>4,496.6 \u03bcs<\/td>\n<td>133.87 \u03bcs<\/td>\n<td>394.71 \u03bcs<\/td>\n<td>4,484.2 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>False<\/td>\n<td>0<\/td>\n<td>747.7 \u03bcs<\/td>\n<td>30.51 \u03bcs<\/td>\n<td>88.51 \u03bcs<\/td>\n<td>719.0 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>False<\/td>\n<td>1<\/td>\n<td>1,211.5 \u03bcs<\/td>\n<td>49.81 \u03bcs<\/td>\n<td>142.92 \u03bcs<\/td>\n<td>1,162.0 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>False<\/td>\n<td>2<\/td>\n<td>2,161.1 \u03bcs<\/td>\n<td>88.84 \u03bcs<\/td>\n<td>259.14 \u03bcs<\/td>\n<td>2,123.4 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>False<\/td>\n<td>3<\/td>\n<td>9,423.3 \u03bcs<\/td>\n<td>702.14 \u03bcs<\/td>\n<td>2,014.57 \u03bcs<\/td>\n<td>9,313.8 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>False<\/td>\n<td>4<\/td>\n<td>90,392.5 \u03bcs<\/td>\n<td>821.13 \u03bcs<\/td>\n<td>727.91 \u03bcs<\/td>\n<td>90,467.2 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>False<\/td>\n<td>5<\/td>\n<td><strong>1,202,652.5 \u03bcs<\/strong><\/td>\n<td>23,336.09 \u03bcs<\/td>\n<td>24,969.36 \u03bcs<\/td>\n<td>1,205,782.6 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>False<\/td>\n<td>6<\/td>\n<td><strong>34,625,732.4 \u03bcs<\/strong><\/td>\n<td>691,082.68 \u03bcs<\/td>\n<td>1,055,356.24 \u03bcs<\/td>\n<td>34,718,363.9 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>True<\/td>\n<td>0<\/td>\n<td>747.0 \u03bcs<\/td>\n<td>24.88 \u03bcs<\/td>\n<td>68.93 \u03bcs<\/td>\n<td>738.7 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>True<\/td>\n<td>1<\/td>\n<td>1,712.9 \u03bcs<\/td>\n<td>53.74 \u03bcs<\/td>\n<td>154.20 \u03bcs<\/td>\n<td>1,697.2 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>True<\/td>\n<td>2<\/td>\n<td>2,519.9 \u03bcs<\/td>\n<td>107.27 \u03bcs<\/td>\n<td>316.28 \u03bcs<\/td>\n<td>2,491.5 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>True<\/td>\n<td>3<\/td>\n<td>3,349.0 \u03bcs<\/td>\n<td>149.58 \u03bcs<\/td>\n<td>436.33 \u03bcs<\/td>\n<td>3,295.7 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>True<\/td>\n<td>4<\/td>\n<td>4,268.4 \u03bcs<\/td>\n<td>165.83 \u03bcs<\/td>\n<td>483.72 \u03bcs<\/td>\n<td>4,274.0 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>True<\/td>\n<td>5<\/td>\n<td><strong>4,882.6 \u03bcs<\/strong><\/td>\n<td>188.59 \u03bcs<\/td>\n<td>547.13 \u03bcs<\/td>\n<td>4,832.2 \u03bcs<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>True<\/td>\n<td>6<\/td>\n<td><strong>5,560.8 \u03bcs<\/strong><\/td>\n<td>249.02 \u03bcs<\/td>\n<td>726.40 \u03bcs<\/td>\n<td>5,478.1 \u03bcs<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u0441 10 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438 (\u043f\u0443\u0441\u0442\u044c \u0438 \u0441 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438) \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0434\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u0438 \u0432 \u043f\u043e\u0447\u0442\u0438 30 \u0440\u0430\u0437.<br \/>  \u0410 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0443\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0434\u0440\u0430\u043c\u0430\u0442\u0438\u0447\u043d\u0430. \u0414\u0430 \u0438 \u0441\u0430\u043c\u0438 \u0446\u0438\u0444\u0440\u044b \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0432 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0445 \u0432\u0435\u043b\u0438\u0438\u0447\u043d\u0430\u0445 (5,5 \u043c\u0441 \u043f\u0440\u043e\u0442\u0438\u0432 34625 \u043c\u0441).<\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0438 \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0442\u043e\u0440\u043d\u044b\u043c\u0438 \u0432\u0437\u0440\u044b\u0432\u0430\u043c\u0438!<\/p>\n<p>  <\/p>\n<h3 id=\"ssylki\">\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/ru-ru\/ef\/core\/querying\/single-split-queries\" rel=\"nofollow noopener noreferrer\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0442 Microsoft<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/ru-ru\/ef\/core\/what-is-new\/ef-core-5.0\/whatsnew\" rel=\"nofollow noopener noreferrer\">\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0438\u0447\u0438 EF Core 5.0<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/zetroot\/CartesianExplosion\" rel=\"nofollow noopener noreferrer\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u043c<\/a><\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/549736\/\"> https:\/\/habr.com\/ru\/post\/549736\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p>ORM Entity Framework Core \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u0441\u0435 \u0431\u043e\u043b\u0435\u0435 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0431\u043e\u0433\u0430\u0442\u043e\u0439 \u043d\u0430 \u0444\u0438\u0447\u0438. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0442\u0440\u0430\u0442\u0438\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043f\u0435\u0440\u0444\u043e\u043c\u0430\u043d\u0441 \u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 Nuget-\u043f\u0430\u043a\u0435\u0442\u0430 \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0441\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438. \u041d\u043e \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0444\u0438\u0447\u0435: \u044d\u0442\u043e \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u2014 &quot;\u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b&quot; \u0438\u043b\u0438 &quot;split queries&quot; \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-320538","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320538","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=320538"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320538\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}