{"id":457,"date":"2023-02-06T09:56:18","date_gmt":"2023-02-06T09:56:18","guid":{"rendered":"https:\/\/dijix.com.ua\/blog\/?p=457"},"modified":"2023-02-06T09:56:18","modified_gmt":"2023-02-06T09:56:18","slug":"sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core","status":"publish","type":"post","link":"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/","title":{"rendered":"\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core"},"content":{"rendered":"<p>\u0423 \u0446\u0456\u0439 \u0441\u0442\u0430\u0442\u0442\u0456 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u043f\u0440\u043e\u0446\u0435\u0441 \u043f\u043e\u0431\u0443\u0434\u043e\u0432\u0438 \u0440\u0435\u0430\u043b\u0456\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0454\u043a\u0442\u0443, \u044f\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0443\u0454 \u0441\u043f\u0456\u043b\u044c\u043d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f ASP.NET Core MVC \u0456 Entity Framework Core. \u041f\u0440\u043e\u0454\u043a\u0442 \u0431\u0443\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u0438\u043c, \u0430\u043b\u0435 \u0431\u043b\u0438\u0437\u044c\u043a\u0438\u043c \u0434\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0456, \u0456 \u0444\u043e\u043a\u0443\u0441\u0443\u0432\u0430\u0442\u0438\u043c\u0435\u0442\u044c\u0441\u044f \u043d\u0430 \u0447\u0430\u0441\u0442\u043e \u0432\u0436\u0438\u0432\u0430\u043d\u0438\u0445 \u0437\u0430\u0441\u043e\u0431\u0430\u0445 Entity Framework Core.<\/p>\n<p>\u0414\u043e\u0434\u0430\u0442\u043e\u043a \u043a\u0435\u0440\u0443\u0432\u0430\u0442\u0438\u043c\u0435 \u0431\u0430\u0437\u043e\u044e \u0434\u0430\u043d\u0438\u0445 <strong>TV Shows<\/strong>, \u0430 \u0439\u043e\u0433\u043e \u0433\u043e\u043b\u043e\u0432\u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430 \u043d\u0430\u043f\u0440\u0438\u043a\u0456\u043d\u0446\u0456 \u043c\u0430\u0442\u0438\u043c\u0435 \u0432\u0438\u0433\u043b\u044f\u0434, \u044f\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0447\u0435.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-431\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/17-min.png\" alt=\"\u0444\u0438\u043b\u044c\u043c\u044b asp.net core \" width=\"971\" height=\"796\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/17-min.png 971w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/17-min-300x246.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/17-min-768x630.png 768w\" sizes=\"auto, (max-width: 971px) 100vw, 971px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">\u0423 \u0446\u044c\u043e\u043c\u0443 \u043f\u0440\u043e\u0454\u043a\u0442\u0456 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0456 \u0441\u043f\u043e\u0441\u043e\u0431\u0438 \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0456\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0456 \u00ab<\/span><b>scaffolding tools<\/b><span style=\"font-weight: 400;\">\u00bb.<\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<h2>\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core<\/h2>\n<p><a href=\"#createProject\">\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0442\u0430 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0443<\/a><\/p>\n<p><a href=\"#modelRepository\">\u041c\u043e\u0434\u0435\u043b\u044c \u0456 \u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0456\u0439<\/a><\/p>\n<p><a href=\"#createDataBase\">\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0431\u0430\u0437\u0438 \u0434\u0430\u043d\u0438\u0445<\/a><\/p>\n<p><a href=\"#firstNote\">\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u043f\u0435\u0440\u0448\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0443<\/a><\/p>\n<p><a href=\"#dataAnnot\">\u0414\u043e\u0434\u0430\u0432\u0430\u043d\u043d\u044f \u0430\u043d\u043e\u0442\u0430\u0446\u0456\u0439 \u0434\u043e \u043c\u043e\u0434\u0435\u043b\u0456<\/a><\/p>\n<p><a href=\"#newProperty\">\u0414\u043e\u0434\u0430\u0432\u0430\u043d\u043d\u044f \u043d\u043e\u0432\u043e\u0457 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0432 \u043c\u043e\u0434\u0435\u043b\u044c<\/a><\/p>\n<p><a href=\"#statsComponent\">\u0414\u043e\u0434\u0430\u0432\u0430\u043d\u043d\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438<\/a><\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"createProject\">\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0442\u0430 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0443<\/h2>\n<p>\u0429\u043e\u0431 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043f\u0440\u043e\u0454\u043a\u0442 <strong>TvShows<\/strong>, \u0437\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c Visual Studio \u0456 \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u0443 \u043c\u0435\u043d\u044e File (\u0424\u0430\u0439\u043b) &#8211; New Project (\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043f\u0440\u043e\u0454\u043a\u0442). \u0412\u043a\u0430\u0436\u0456\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0443 ASP.NET Core Web Application (\u0412\u0435\u0431-\u0434\u043e\u0434\u0430\u0442\u043e\u043a ASP.NET Core). \u0412\u0432\u0435\u0434\u0456\u0442\u044c <strong>TvShows<\/strong>, \u0443 \u043f\u043e\u043b\u0456 Name, \u043d\u0430 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0456\u0439 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 \u0432\u043a\u0430\u0436\u0456\u0442\u044c Framework .Net 7.0 \u0456 \u043d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 <strong>Create<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-432\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/1-min.png\" alt=\"\u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 asp.net core mvc\" width=\"1005\" height=\"651\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/1-min.png 1005w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/1-min-300x194.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/1-min-768x497.png 768w\" sizes=\"auto, (max-width: 1005px) 100vw, 1005px\" \/><\/p>\n<p>\u041d\u0430 \u0434\u0430\u043d\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043d\u0430\u0441 \u0454 \u043f\u043e\u0447\u0430\u0442\u043a\u043e\u0432\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u043f\u0440\u043e\u0435\u043a\u0442 (<strong>Crtl + F5<\/strong>), \u0449\u043e\u0431 \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0430\u0442\u0438\u0441\u044f, \u0449\u043e \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0443. \u041d\u0438\u0436\u0447\u0435 \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u044f\u043a\u043e\u0433\u043e \u0432\u0438 \u0445\u043e\u0447\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u0441\u0430\u0439\u0442:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-433\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/2-min.png\" alt=\"visual studio \u0432\u044b\u0431\u043e\u0440 \u0431\u0440\u0430\u0437\u0443\u0435\u0440\u0430\" width=\"292\" height=\"253\" \/><\/p>\n<p>\u041f\u0456\u0441\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043c\u0438 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u043c\u043e \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u043f\u0440\u0438\u0432\u0456\u0442\u0430\u043d\u043d\u044f, \u044f\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0447\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-434\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/3-min.png\" alt=\"\u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 asp net mvc\" width=\"931\" height=\"399\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/3-min.png 931w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/3-min-300x129.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/3-min-768x329.png 768w\" sizes=\"auto, (max-width: 931px) 100vw, 931px\" \/><\/p>\n<p>MVC \u0432\u0438\u043a\u043b\u0438\u043a\u0430\u0454 \u043a\u043b\u0430\u0441\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0456\u0432 (\u0456 \u043c\u0435\u0442\u043e\u0434\u0438 \u0434\u0456\u0439 \u0443 \u043d\u0438\u0445) \u0437\u0430\u043b\u0435\u0436\u043d\u043e \u0432\u0456\u0434 \u0432\u0445\u0456\u0434\u043d\u043e\u0433\u043e URL. \u041b\u043e\u0433\u0456\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0456\u0457 URL, \u044f\u043a\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f MVC \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c, \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454 \u0442\u0430\u043a\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442, \u0449\u043e\u0431 \u0432\u0438\u0437\u043d\u0430\u0447\u0438\u0442\u0438, \u044f\u043a\u0438\u0439 \u043a\u043e\u0434 \u0441\u043b\u0456\u0434 \u0432\u0438\u043a\u043b\u0438\u043a\u0430\u0442\u0438:<\/p>\n<pre class=\"lang:default decode:true\">\/[Controller]\/[ActionName]\/[Parameters]<\/pre>\n<p><span style=\"font-weight: 400;\">\u0424\u043e\u0440\u043c\u0430\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0456\u0457 \u0437\u0430\u0434\u0430\u0454\u0442\u044c\u0441\u044f \u0443 \u0444\u0430\u0439\u043b\u0456 <\/span><b>Program.cs<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre class=\"lang:default decode:true \">app.MapControllerRoute(\r\n                name: \"default\",\r\n                pattern: \"{controller=Home}\/{action=Index}\/{id?}\");<\/pre>\n<p>\u041a\u043e\u043b\u0438 \u0432\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u0434\u043e \u0437\u0430\u0441\u0442\u043e\u0441\u0443\u043d\u043a\u0443 \u0456 \u043d\u0435 \u0432\u043a\u0430\u0437\u0443\u0454\u0442\u0435 \u0436\u043e\u0434\u043d\u0438\u0445 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0456\u0432 URL, \u0432\u0456\u043d \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440 HomeController \u0456 \u043c\u0435\u0442\u043e\u0434 Index, \u0437\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432\u0438\u0449\u0435. \u0422\u0430\u043a\u0438\u043c \u0447\u0438\u043d\u043e\u043c, \u044f\u043a\u0449\u043e \u0432\u0438 \u0432\u0432\u0435\u0434\u0435\u0442\u0435 https:\/\/localhost:XXXX\/Home\/Index \u044f\u043a URL-\u0430\u0434\u0440\u0435\u0441\u0443, \u0432\u0438 \u043e\u0442\u0440\u0438\u043c\u0430\u0454\u0442\u0435 \u0442\u0443 \u0441\u0430\u043c\u0443 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u043f\u0440\u0438\u0432\u0456\u0442\u0430\u043d\u043d\u044f, \u044f\u043a\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0432\u0438\u0449\u0435.<\/p>\n<h2 id=\"modelRepository\">\u041c\u043e\u0434\u0435\u043b\u044c \u0456 \u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0456\u0439<\/h2>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 <strong>TVShows<\/strong> \u0431\u0443\u0434\u0435 \u0437\u0430\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0441\u043f\u0438\u0441\u043a\u0443 \u0444\u0456\u043b\u044c\u043c\u0456\u0432. \u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0440\u0435\u0430\u043b\u0456\u0437\u0443\u0454\u043c\u043e \u043a\u043b\u0430\u0441 <strong>TvShow<\/strong>. \u041c\u0438 \u0431\u0443\u0434\u0435\u043c\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0446\u0435\u0439 \u043a\u043b\u0430\u0441 \u0437 Entity Framework Core (EF Core) \u0434\u043b\u044f \u0440\u043e\u0431\u043e\u0442\u0438 \u0437 \u0431\u0430\u0437\u043e\u044e \u0434\u0430\u043d\u0438\u0445. EF Core &#8211; \u0446\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043e\u0431&#8217;\u0454\u043a\u0442\u043d\u043e-\u0440\u0435\u043b\u044f\u0446\u0456\u0439\u043d\u043e\u0433\u043e \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f (ORM), \u044f\u043a\u0438\u0439 \u0441\u043f\u0440\u043e\u0449\u0443\u0454 \u043a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0443 \u0434\u043e \u0434\u0430\u043d\u0438\u0445. \u041a\u043b\u0430\u0441\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0435 \u043c\u0430\u044e\u0442\u044c \u0437\u0430\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0456 \u0432\u0456\u0434 EF Core. \u0412\u043e\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0438\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u044c \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0434\u0430\u043d\u0438\u0445, \u044f\u043a\u0456 \u0431\u0443\u0434\u0443\u0442\u044c \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438\u0441\u044f \u0432 \u0431\u0430\u0437\u0456 \u0434\u0430\u043d\u0438\u0445.<\/p>\n<p>\u0421\u0442\u0432\u043e\u0440\u0456\u0442\u044c \u043f\u0430\u043f\u043a\u0443 <strong>Models<\/strong> \u0456 \u0434\u043e\u0434\u0430\u0439\u0442\u0435 \u0432 \u043d\u0435\u0457 \u0444\u0430\u0439\u043b \u043a\u043b\u0430\u0441\u0443 \u043d\u0430 \u0456\u043c&#8217;\u044f <strong>TvShow.cs<\/strong> \u0437 \u0442\u0430\u043a\u0438\u043c \u0432\u043c\u0456\u0441\u0442\u043e\u043c:<\/p>\n<pre class=\"lang:default decode:true \">public class TvShow\r\n    {\r\n        public int Id { get; set; }\r\n\r\n        public string Title { get; set; }\r\n\r\n        public Genre Genre { get; set; }\r\n\r\n        public decimal Rating { get; set; }\r\n\r\n        public string ImdbUrl { get; set; }\r\n    }\r\n<\/pre>\n<p>\u041f\u043e\u0442\u0456\u043c \u0434\u043e\u0434\u0430\u0439\u0442\u0435 \u0449\u0435 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441 \u043f\u0456\u0434 \u043d\u0430\u0437\u0432\u043e\u044e <strong>Genre.cs<\/strong>, \u044f\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0447\u0435:<\/p>\n<pre class=\"lang:default decode:true \">public enum Genre\r\n    {\r\n        Drama,\r\n        Comedy,\r\n        Romance,\r\n        [Display(Name = \"Romantic Comedy\")]\r\n        RomCom,\r\n        Crime,\r\n        Mystery\r\n    }\r\n<\/pre>\n<p>\u0414\u0430\u043b\u0456 \u0441\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440 \u0456 \u043f\u043e\u0434\u0430\u043d\u043d\u044f (\u0447\u0430\u0441\u0442\u0438\u043d\u0430 View-Controller \u0434\u043e\u0434\u0430\u0442\u043a\u0430 MVC). \u0417\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c \u0443 \u043d\u0430\u0448\u043e\u043c\u0443 \u043f\u0440\u043e\u0454\u043a\u0442\u0456 \u0432\u0436\u0435 \u0454 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440 &#8211; HomeController.cs, \u0432\u0438\u0434\u0430\u043b\u0438\u043c\u043e \u0439\u043e\u0433\u043e \u0456 \u0434\u043e\u0434\u0430\u043c\u043e \u0437\u043d\u043e\u0432\u0443.<\/p>\n<p>\u041a\u043b\u0430\u0446\u043d\u0456\u0442\u044c \u043f\u0440\u0430\u0432\u043e\u044e \u043a\u043d\u043e\u043f\u043a\u043e\u044e \u043c\u0438\u0448\u0456 \u043f\u0430\u043f\u043a\u0443 <strong>Controllers<\/strong> \u0456 \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044c <strong>Add<\/strong> -&gt; <strong>Controller<\/strong>. \u0423 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456 \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044c &#8220;<strong>MVC Controller with views, using Entity Framework<\/strong>&#8221; \u0456 \u043d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c <strong>Add<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-435\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/4-min.png\" alt=\"\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0441 scaffolding\" width=\"428\" height=\"329\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/4-min.png 428w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/4-min-300x231.png 300w\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" \/><\/p>\n<p>\u0423 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456 \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044c <strong>TvShow<\/strong> \u044f\u043a \u043a\u043b\u0430\u0441 &#8220;<strong>Model<\/strong>&#8221; \u0456 \u043d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u0437\u043d\u0430\u043a + \u0443 \u043a\u043b\u0430\u0441\u0456 &#8220;<strong>Data context<\/strong>&#8221; \u0456 \u0434\u0430\u0439\u0442\u0435 \u0439\u043e\u043c\u0443 \u0456\u043c&#8217;\u044f <strong>ApplicationContext<\/strong>. \u0417\u0430\u043b\u0438\u0448\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c \u0434\u043b\u044f \u0456\u043d\u0448\u0438\u0445 \u043f\u043e\u043b\u0456\u0432 \u0456 \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044c &#8211; <strong>\u0414\u043e\u0434\u0430\u0442\u0438<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-436\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/5-min.png\" alt=\"scaffolding mvc core\" width=\"648\" height=\"411\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/5-min.png 648w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/5-min-300x190.png 300w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/p>\n<p>\u042f\u043a\u0449\u043e \u043f\u0456\u0434 \u0447\u0430\u0441 \u0434\u043e\u0434\u0430\u0432\u0430\u043d\u043d\u044f \u0432\u0438\u043d\u0438\u043a\u043b\u0430 \u043f\u043e\u043c\u0438\u043b\u043a\u0430, \u0437 \u0442\u0430\u043a\u0438\u043c \u0432\u043c\u0456\u0441\u0442\u043e\u043c:<\/p>\n<p><i><span style=\"font-weight: 400;\">\u00abinstall the package microsoft.visualstudio.web.codegeneration.design and try again\u00bb<\/span><\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-437\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/6-min.png\" alt=\"install the package microsoft.visualstudio.web.codegeneration.design\" width=\"407\" height=\"200\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/6-min.png 407w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/6-min-300x147.png 300w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044c \u0443 <strong>Dependencies<\/strong> &#8211; <strong>Manage NuGet Packages<\/strong> &#8211; <strong>Browse<\/strong> \u0456 \u0432\u043a\u0430\u0436\u0456\u0442\u044c \u0443 \u043f\u043e\u0448\u0443\u043a\u0443:<\/p>\n<pre class=\"lang:default decode:true \">Microsoft.VisualStudio.Web.CodeGeneration.Design<\/pre>\n<p>\u0412\u0441\u0442\u0430\u043d\u043e\u0432\u0456\u0442\u044c \u0446\u044e \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0443. <strong>\u0412\u0410\u0416\u041b\u0418\u0412\u041e!<\/strong> \u042f\u043a\u0449\u043e \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0430 \u0432\u0436\u0435 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0456 \u043f\u043e\u043c\u0438\u043b\u043a\u0430, \u044f\u043a \u0456 \u0440\u0430\u043d\u0456\u0448\u0435, \u0432\u0438\u043d\u0438\u043a\u0430\u0454, \u0441\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0456\u0431\u0440\u0430\u0442\u0438 \u043f\u0440\u043e\u0454\u043a\u0442 \u0430\u0431\u043e \u0436 \u043f\u0435\u0440\u0435\u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0438 \u0446\u044e \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0443 \u0432\u0440\u0443\u0447\u043d\u0443.<\/p>\n<p>\u041d\u0430 \u0446\u044c\u043e\u043c\u0443 \u0435\u0442\u0430\u043f\u0456 \u043f\u0440\u0430\u0446\u044e\u0454 \u0456\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 scaffolding. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u0435 \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 \u0431\u0430\u0437\u0438 \u0434\u0430\u043d\u0438\u0445 \u0456 \u043c\u0435\u0442\u043e\u0434\u0456\u0432 \u0442\u0430 \u043f\u043e\u0434\u0430\u043d\u044c <strong>CRUD<\/strong> (create, read, update, and delete) \u0434\u0456\u0439 \u0432\u0456\u0434\u043e\u043c\u043e \u044f\u043a scaffolding.<\/p>\n<p>\u0420\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e, \u0449\u043e Visual Studio \u0434\u043e\u0434\u0430\u043b\u0430 \u0432 \u043d\u0430\u0448 \u043f\u0440\u043e\u0454\u043a\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0432\u043d\u0430\u0441\u043b\u0456\u0434\u043e\u043a \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0431\u0443\u0434\u0456\u0432\u0435\u043b\u044c\u043d\u0438\u0445 \u0440\u0438\u0448\u0442\u0443\u0432\u0430\u043d\u044c.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0443\u043f\u043d\u0456 \u043c\u0435\u0442\u043e\u0434\u0438 \u0454 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0434\u0456\u0457 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0430 <strong>TvShowsController<\/strong>:<\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Index (GET)\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Details (GET)\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Create (GET &amp; POST)\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Edit (GET &amp; POST)\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Delete (GET &amp; POST)<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-438\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/7-min.png\" alt=\"scaffolding controller in mvc\" width=\"848\" height=\"660\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/7-min.png 848w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/7-min-300x233.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/7-min-768x598.png 768w\" sizes=\"auto, (max-width: 848px) 100vw, 848px\" \/><\/p>\n<p>\u0424\u0430\u0439\u043b\u0438 \u043f\u043e\u0434\u0430\u043d\u043d\u044f <strong>Razor<\/strong> \u0434\u043b\u044f \u0441\u0442\u043e\u0440\u0456\u043d\u043e\u043a: \u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438, \u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438, \u041f\u043e\u0434\u0440\u043e\u0431\u0438\u0446\u0456, \u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0442\u0430 \u0406\u043d\u0434\u0435\u043a\u0441, \u0442\u0430\u043a \u0441\u0430\u043c\u043e \u0431\u0443\u043b\u0438 \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u0456 \u0437\u0430 \u0430\u0434\u0440\u0435\u0441\u043e\u044e &#8211; <strong>Views<\/strong> \/ <strong>TvShows<\/strong>.<\/p>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0431\u0443\u043b\u0438 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u0456 \u0431\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0438, \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u0456 \u0434\u043b\u044f \u0440\u043e\u0431\u043e\u0442\u0438 \u0437 Entity Framework Core:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-439\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/8-min.png\" alt=\"ef core libraries\" width=\"332\" height=\"172\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/8-min.png 332w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/8-min-300x155.png 300w\" sizes=\"auto, (max-width: 332px) 100vw, 332px\" \/><\/p>\n<p>\u0423 \u043a\u043e\u0440\u0435\u043d\u0456 \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u043c\u043e\u0436\u043d\u0430 \u043f\u043e\u0431\u0430\u0447\u0438\u0442\u0438 \u043d\u043e\u0432\u0443 \u043f\u0430\u043f\u043a\u0443 <strong>Data<\/strong>, \u0437\u0456 \u0437\u0433\u0435\u043d\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u043c \u043a\u043b\u0430\u0441\u043e\u043c <strong>ApplicationContext<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">public class ApplicationContext : DbContext\r\n    {\r\n        public ApplicationContext (DbContextOptions&lt;ApplicationContext&gt; options)\r\n            : base(options)\r\n        {\r\n        }\r\n\r\n        public DbSet&lt;TvShow&gt; TvShow { get; set; } = default!;\r\n    }\r\n<\/pre>\n<p>ApplicationContext \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0443\u0454 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u044c\u043d\u0456\u0441\u0442\u044c EF Core (Create, Read, Update, Delete \u0442\u043e\u0449\u043e) \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0456 TvShow. TvShowsContext \u0454 \u043f\u043e\u0445\u0456\u0434\u043d\u0438\u043c \u0432\u0456\u0434 Microsoft.EntityFrameworkCore.DbContext. \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u0430\u043d\u0438\u0445 \u0432\u0438\u0437\u043d\u0430\u0447\u0430\u0454, \u044f\u043a\u0456 \u0441\u0443\u0442\u043d\u043e\u0441\u0442\u0456 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0456 \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u0438\u0445.<\/p>\n<p>\u0406\u043c&#8217;\u044f \u0440\u044f\u0434\u043a\u0430 \u043f\u0456\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0454\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0448\u043b\u044f\u0445\u043e\u043c \u0432\u0438\u043a\u043b\u0438\u043a\u0443 \u043c\u0435\u0442\u043e\u0434\u0443 \u043d\u0430 \u043e\u0431&#8217;\u0454\u043a\u0442\u0456 DbContextOptions. \u0414\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0457 \u0440\u043e\u0437\u0440\u043e\u0431\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0457 ASP.NET Core \u0437\u0447\u0438\u0442\u0443\u0454 \u0440\u044f\u0434\u043e\u043a \u043f\u0456\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044f \u0437 \u0444\u0430\u0439\u043b\u0443 <strong>appsettings.json<\/strong>, \u044f\u043a\u0438\u0439 \u0432\u0436\u0435 \u0443\u0441\u043f\u0456\u0448\u043d\u043e \u0437\u0433\u0435\u043d\u0435\u0440\u043e\u0432\u0430\u043d\u043e \u0437 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u0438\u043c \u0432\u043c\u0456\u0441\u0442\u043e\u043c, \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c\u043e \u0434\u043e \u0444\u0430\u0439\u043b\u0443 \u0456 \u0437\u043c\u0456\u043d\u0438 \u043d\u0430\u0437\u0432\u0443 \u0431\u0430\u0437\u0438 \u0434\u0430\u043d\u0438\u0445 \u043d\u0430 <strong>TvShowsDb<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">\"ConnectionStrings\": {\r\n    \"ApplicationContext\": \"Server=(localdb)\\\\mssqllocaldb;Database=TvShowsDb;Trusted_Connection=True;MultipleActiveResultSets=true\"\r\n  }\r\n<\/pre>\n<p>ASP.NET Core \u043f\u043e\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0439 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c \u0456\u043d&#8217;\u0454\u043a\u0446\u0456\u0457 \u0437\u0430\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0435\u0439 (DI). \u0421\u043b\u0443\u0436\u0431\u0438 (\u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0411\u0414 EF Core) \u0440\u0435\u0454\u0441\u0442\u0440\u0443\u044e\u0442\u044c\u0441\u044f \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e DI \u043f\u0456\u0434 \u0447\u0430\u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438, \u044f\u043a\u0438\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0456 \u0446\u0456 \u0441\u043b\u0443\u0436\u0431\u0438, \u043e\u0442\u0440\u0438\u043c\u0443\u044e\u0442\u044c \u0457\u0445 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430:<\/p>\n<pre class=\"lang:default decode:true \">builder.Services.AddDbContext&lt;ApplicationContext&gt;(options =&gt;\r\n                options.UseSqlServer(builder.Configuration.GetConnectionString(\"ApplicationContext\") \r\n                ?? throw new InvalidOperationException(\"Connection string 'ApplicationContext' not found.\")));\r\n<\/pre>\n<p>\u0423 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0456 <strong>Controllers<\/strong> \/ <strong>TvShowsController.cs<\/strong> \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454 \u0432\u043f\u0440\u043e\u0432\u0430\u0434\u0436\u0435\u043d\u043d\u044f \u0437\u0430\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0432\u043f\u0440\u043e\u0432\u0430\u0434\u0436\u0435\u043d\u043d\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 \u0431\u0430\u0437\u0438 \u0434\u0430\u043d\u0438\u0445 (TvShowsContext) \u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440:<\/p>\n<pre class=\"lang:default decode:true \">public class TvShowsController : Controller\r\n    {\r\n        private readonly ApplicationContext _context;\r\n\r\n        public TvShowsController(ApplicationContext context)\r\n        {\r\n            _context = context;\r\n        }\r\n        \/\/...\r\n    }\r\n<\/pre>\n<h2 id=\"createDataBase\">\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0431\u0430\u0437\u0438 \u0434\u0430\u043d\u0438\u0445<\/h2>\n<p>\u0421\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u0438\u0445 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0444\u0443\u043d\u043a\u0446\u0456\u0457 EF Core Migrations. \u041c\u0456\u0433\u0440\u0430\u0446\u0456\u0457 \u0434\u0430\u0454 \u043d\u0430\u043c \u0437\u043c\u043e\u0433\u0443 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u0438\u0445, \u0449\u043e \u0432\u0456\u0434\u043f\u043e\u0432\u0456\u0434\u0430\u0454 \u043d\u0430\u0448\u0456\u0439 \u043c\u043e\u0434\u0435\u043b\u0456 \u0434\u0430\u043d\u0438\u0445, \u0456 \u043e\u043d\u043e\u0432\u043b\u044e\u0432\u0430\u0442\u0438 \u0441\u0445\u0435\u043c\u0443 \u0431\u0430\u0437\u0438 \u0434\u0430\u043d\u0438\u0445 \u0443 \u0440\u0430\u0437\u0456 \u0437\u043c\u0456\u043d\u0438 \u043c\u043e\u0434\u0435\u043b\u0456 \u0434\u0430\u043d\u0438\u0445.<\/p>\n<p>\u0412\u0456\u0434\u043a\u0440\u0438\u0439\u0442\u0435 <strong>Tools<\/strong> -&gt; <strong>NuGet Package Manager<\/strong> &gt; <strong>Package Manager Console<\/strong> (PMC) \u0456 \u0432\u0438\u043a\u043e\u043d\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 PMC:<\/p>\n<pre class=\"lang:default decode:true\">PM&gt; Add-Migration Initial<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-442\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/9-min.png\" alt=\"Add-Migration Initial\" width=\"679\" height=\"200\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/9-min.png 679w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/9-min-300x88.png 300w\" sizes=\"auto, (max-width: 679px) 100vw, 679px\" \/><\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <strong>Add-Migration<\/strong> \u0433\u0435\u043d\u0435\u0440\u0443\u0454 \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u043f\u043e\u0447\u0430\u0442\u043a\u043e\u0432\u043e\u0457 \u0441\u0445\u0435\u043c\u0438 \u0431\u0430\u0437\u0438 \u0434\u0430\u043d\u0438\u0445, \u0449\u043e \u0491\u0440\u0443\u043d\u0442\u0443\u0454\u0442\u044c\u0441\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u0456, \u0437\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0456\u0439 \u0443 \u043a\u043b\u0430\u0441\u0456 <strong>TvShowsContext<\/strong>. \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <strong>Initial<\/strong> &#8211; \u0446\u0435 \u0456\u043c&#8217;\u044f \u043c\u0456\u0433\u0440\u0430\u0446\u0456\u0457, \u043c\u043e\u0436\u043d\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0431\u0443\u0434\u044c-\u044f\u043a\u0435 \u0456\u043c&#8217;\u044f.<\/p>\n<p>\u041f\u0456\u0441\u043b\u044f \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043d\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0438 \u0432 \u043f\u0430\u043f\u0446\u0456 <strong>Migrations<\/strong> \u0431\u0443\u0434\u0435 \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043e \u0444\u0430\u0439\u043b \u043c\u0456\u0433\u0440\u0430\u0446\u0456\u0457:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-443\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/10-min.png\" alt=\"\u0444\u0430\u0439\u043b \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438\" width=\"673\" height=\"529\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/10-min.png 673w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/10-min-300x236.png 300w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/p>\n<p>\u042f\u043a \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u0439 \u043a\u0440\u043e\u043a \u0432\u0438\u043a\u043e\u043d\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 <strong>Package Manager Console<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">PM&gt; Update-Database<\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430<strong> Update-Database<\/strong> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454 \u043c\u0435\u0442\u043e\u0434 Up \u0443 \u0444\u0430\u0439\u043b\u0456 Migrations\/{time-stamp}_InitialCreate.cs, \u044f\u043a\u0438\u0439 \u0441\u0442\u0432\u043e\u0440\u044e\u0454 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u0438\u0445.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u043c\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u0438\u0445. \u0412\u0456\u0434\u043a\u0440\u0438\u0439\u0442\u0435 <strong>View<\/strong> -&gt; <strong>Sql Server Object Explorer<\/strong>. \u0412\u0438 \u043f\u043e\u0431\u0430\u0447\u0438\u0442\u0435 \u0449\u043e\u0439\u043d\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u0438\u0445 \u0437\u0430 \u0442\u0430\u043a\u0438\u043c \u0448\u043b\u044f\u0445\u043e\u043c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-444\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/11-min.png\" alt=\"\u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 ef core\" width=\"359\" height=\"439\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/11-min.png 359w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/11-min-245x300.png 245w\" sizes=\"auto, (max-width: 359px) 100vw, 359px\" \/><\/p>\n<p>\u042f\u043a \u0432\u0438 \u0431\u0430\u0447\u0438\u0442\u0435, \u0442\u0430\u0431\u043b\u0438\u0446\u044f <strong>TvShows<\/strong> \u0456 \u0442\u0430\u0431\u043b\u0438\u0446\u044f \u0456\u0441\u0442\u043e\u0440\u0456\u0457 \u043c\u0456\u0433\u0440\u0430\u0446\u0456\u0439 \u0441\u0442\u0432\u043e\u0440\u044e\u044e\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e. \u041f\u043e\u0442\u0456\u043c \u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044e \u0456\u0441\u0442\u043e\u0440\u0456\u0457 \u043c\u0456\u0433\u0440\u0430\u0446\u0456\u0439 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0454\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0438\u0441, \u0449\u043e\u0431 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0438 \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u0456 \u043c\u0456\u0433\u0440\u0430\u0446\u0456\u0457 \u0432 \u0431\u0430\u0437\u0456 \u0434\u0430\u043d\u0438\u0445.<\/p>\n<h2 id=\"firstNote\">\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u043f\u0435\u0440\u0448\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0443<\/h2>\n<p>\u041e\u0441\u043a\u0456\u043b\u044c\u043a\u0438 \u043f\u043e\u0447\u0430\u0442\u043a\u043e\u0432\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440 <strong>HomeController<\/strong> \u0431\u0443\u043b\u043e \u0432\u0438\u0434\u0430\u043b\u0435\u043d\u043e, \u0430 \u0437\u0430\u043c\u0456\u0441\u0442\u044c \u043d\u044c\u043e\u0433\u043e \u0431\u0443\u043b\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043e \u043d\u043e\u0432\u0438\u0439 &#8211; <strong>TvShowsController<\/strong>. \u041d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0442\u0440\u043e\u0445\u0438 \u043f\u0456\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0456\u0457, \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c\u043e \u0443 \u0444\u0430\u0439\u043b <strong>Program.cs<\/strong> \u0456 \u0437\u043c\u0456\u043d\u0438\u043c\u043e \u043f\u043e\u0447\u0430\u0442\u043a\u043e\u0432\u0438\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442:<\/p>\n<pre class=\"lang:default decode:true \">app.MapControllerRoute(\r\n                name: \"default\",\r\n                pattern: \"{controller=TvShows}\/{action=Index}\/{id?}\");<\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u0434\u043e\u0434\u0430\u0442\u043e\u043a, \u043d\u0430 \u0433\u043e\u043b\u043e\u0432\u043d\u0456\u0439 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 \u043d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u0437\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c &#8211; <strong>Create New<\/strong>.<\/p>\n<p>\u041d\u0430\u0440\u0430\u0437\u0456 \u0441\u043f\u0438\u0441\u043e\u043a <strong>Genre<\/strong>, \u0449\u043e \u0432\u0438\u043f\u0430\u0434\u0430\u0454, \u043f\u043e\u0440\u043e\u0436\u043d\u0456\u0439. \u041c\u0438 \u0432\u0456\u0434\u0440\u0435\u0434\u0430\u0433\u0443\u0454\u043c\u043e <strong>Create.cshtml<\/strong>, \u0449\u043e\u0431 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0456\u0437 \u043f\u0435\u0440\u0435\u0440\u0430\u0445\u0443\u0432\u0430\u043d\u043d\u044f Genre, \u044f\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0447\u0435:<\/p>\n<pre class=\"lang:default decode:true \">&lt;div class=\"form-group\"&gt;\r\n                &lt;label asp-for=\"Genre\" class=\"control-label\"&gt;&lt;\/label&gt;\r\n                @*&lt;select asp-for=\"Genre\" class=\"form-control\"&gt;&lt;\/select&gt;*@\r\n                &lt;select asp-for=\"Genre\" asp-items=\"Html.GetEnumSelectList&lt;Genre&gt;()\" class=\"form-control\"&gt;&lt;\/select&gt;\r\n                &lt;span asp-validation-for=\"Genre\" class=\"text-danger\"&gt;&lt;\/span&gt;\r\n            &lt;\/div&gt;\r\n<\/pre>\n<p>\u041f\u0456\u0441\u043b\u044f \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f <strong>Create.cshtml<\/strong>, \u044f\u043a\u0449\u043e \u043e\u043d\u043e\u0432\u0438\u0442\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0437\u043c\u0456\u043d\u0438 \u0431\u0443\u0434\u0443\u0442\u044c \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0456, \u0430 \u0441\u043f\u0438\u0441\u043e\u043a \u0436\u0430\u043d\u0440\u0443, \u0449\u043e \u0432\u0438\u043f\u0430\u0434\u0430\u0454, \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043e. \u0422\u0435\u043f\u0435\u0440 \u043c\u0438 \u043c\u043e\u0436\u0435\u043c\u043e \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043f\u0435\u0440\u0448\u0438\u0439 \u0437\u0430\u043f\u0438\u0441. (\u0410\u043d\u0430\u043b\u043e\u0433\u0456\u0447\u043d\u0456 \u0437\u043c\u0456\u043d\u0438 \u0441\u043b\u0456\u0434 \u0437\u0440\u043e\u0431\u0438\u0442\u0438 \u0456 \u0432 <strong>Edit.cshtml<\/strong>):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-445\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/12-min.png\" alt=\"asp net core create\" width=\"455\" height=\"443\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/12-min.png 455w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/12-min-300x292.png 300w\" sizes=\"auto, (max-width: 455px) 100vw, 455px\" \/><\/p>\n<p>\u041f\u0456\u0441\u043b\u044f \u043d\u0430\u0442\u0438\u0441\u043a\u0430\u043d\u043d\u044f \u043a\u043d\u043e\u043f\u043a\u0438 <strong>Create<\/strong>, \u043d\u043e\u0432\u0438\u0439 \u0437\u0430\u043f\u0438\u0441 \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0454\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 Index, \u044f\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0447\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-446\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/13-min.png\" alt=\"asp net core mvc crud\" width=\"1311\" height=\"234\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/13-min.png 1311w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/13-min-300x54.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/13-min-1024x183.png 1024w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/13-min-768x137.png 768w\" sizes=\"auto, (max-width: 1311px) 100vw, 1311px\" \/><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440 \u043c\u0438 \u0431\u0443\u0434\u0435\u043c\u043e \u043f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 <strong>ImdbUrl<\/strong> \u044f\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f. \u0417\u043c\u0456\u043d\u0456\u0442\u044c <strong>Views<\/strong> \/ <strong>TvShows<\/strong> \/ <strong>Index.cshtml<\/strong> \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u043c \u0447\u0438\u043d\u043e\u043c:<\/p>\n<pre class=\"lang:default decode:true \">&lt;td&gt;\r\n                @*@Html.DisplayFor(modelItem =&gt; item.ImdbUrl)*@\r\n                    &lt;a href=\"@item.ImdbUrl\" target=\"_blank\"&gt;@item.Title&lt;\/a&gt;\r\n            &lt;\/td&gt;<\/pre>\n<h2 id=\"dataAnnot\">\u0414\u043e\u0434\u0430\u0432\u0430\u043d\u043d\u044f \u0430\u043d\u043e\u0442\u0430\u0446\u0456\u0439 \u0434\u043e \u043c\u043e\u0434\u0435\u043b\u0456<\/h2>\n<p>\u0423 \u0446\u044c\u043e\u043c\u0443 \u0440\u043e\u0437\u0434\u0456\u043b\u0456 \u0434\u043e\u0434\u0430\u043c\u043e \u0430\u043d\u043e\u0442\u0430\u0446\u0456\u0457 \u0434\u0430\u043d\u0438\u0445 \u0443 \u043d\u0430\u0448\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0446\u0456\u043b\u0435\u0439 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u0442\u0430 \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f. \u0410\u043d\u043e\u0442\u0430\u0446\u0456\u0457 \u0434\u0430\u043d\u0438\u0445 \u043d\u0430\u0434\u0430\u044e\u0442\u044c \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0439 \u043d\u0430\u0431\u0456\u0440 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0456\u0432 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438, \u044f\u043a\u0456 \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u0441\u0442\u043e\u0441\u0443\u0432\u0430\u0442\u0438 \u0434\u043e \u0431\u0443\u0434\u044c-\u044f\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0443 \u0430\u0431\u043e \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456. \u0412\u0456\u043d \u0442\u0430\u043a\u043e\u0436 \u043c\u0456\u0441\u0442\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0443\u0432\u0430\u043d\u043d\u044f, \u044f\u043a\u0456 \u0434\u043e\u043f\u043e\u043c\u0430\u0433\u0430\u044e\u0442\u044c \u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443\u0432\u0430\u043d\u043d\u0456.<\/p>\n<p>\u0417\u043c\u0456\u043d\u0438\u043c\u043e \u043a\u043b\u0430\u0441 <strong>TvShow<\/strong>.cs, \u0442\u0430\u043a\u0438\u043c \u0447\u0438\u043d\u043e\u043c:<\/p>\n<pre class=\"lang:default decode:true\">using System.ComponentModel.DataAnnotations;\r\n\r\nnamespace TvShows.Models\r\n{\r\n    public class TvShow\r\n    {\r\n        public int Id { get; set; }\r\n        [Required(ErrorMessage = \"Enter movie 'Title'\")]\r\n        [StringLength(50, MinimumLength = 3)]\r\n\r\n        public string? Title { get; set; }\r\n\r\n        public Genre Genre { get; set; }\r\n        [Required(ErrorMessage = \"Enter movie 'Rating'\")]\r\n\r\n        public decimal? Rating { get; set; }\r\n        [Required(ErrorMessage = \"Enter movie 'Imdb Url'\")]\r\n        [DataType(DataType.Url)]\r\n        [Display(Name = \"Imdb Url\")]\r\n\r\n        public string? ImdbUrl { get; set; }\r\n    }\r\n}\r\n\r\n<\/pre>\n<p>\u042f\u043a\u0449\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0456 \u0441\u043f\u0440\u043e\u0431\u0443\u0454\u043c\u043e \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u0437\u0430\u043f\u0438\u0441, \u044f\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0447\u0435, \u043c\u0438 \u0437\u043c\u043e\u0436\u0435\u043c\u043e \u043f\u043e\u0431\u0430\u0447\u0438\u0442\u0438 \u0435\u0444\u0435\u043a\u0442 \u0432\u0456\u0434 \u0446\u0438\u0445 \u0430\u043d\u043e\u0442\u0430\u0446\u0456\u0439 \u0434\u0430\u043d\u0438\u0445:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-448\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/14-min.png\" alt=\"asp.net core annotation validation\" width=\"450\" height=\"514\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/14-min.png 450w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/14-min-263x300.png 263w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/p>\n<p>\u041f\u043e\u043c\u0438\u043b\u043a\u0438 \u0432\u043f\u0440\u043e\u0432\u0430\u0434\u0436\u0443\u044e\u0442\u044c\u0441\u044f \u044f\u043a \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0456 \u043a\u043b\u0456\u0454\u043d\u0442\u0430 (\u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e JavaScript \u0456 jQuery), \u0442\u0430\u043a \u0456 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0456 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0443 \u0440\u0430\u0437\u0456, \u044f\u043a\u0449\u043e \u0443 \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430 \u0432\u0456\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 JavaScript).<\/p>\n<h2 id=\"newProperty\">\u0414\u043e\u0434\u0430\u0432\u0430\u043d\u043d\u044f \u043d\u043e\u0432\u043e\u0457 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0432 \u043c\u043e\u0434\u0435\u043b\u044c<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440 \u043c\u0438 \u0434\u043e\u0434\u0430\u043c\u043e \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u0456\u0441\u0442\u044c <strong>ImageUrl<\/strong> \u0443 \u043d\u0430\u0448 \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0456 \u043f\u043e\u043a\u0430\u0436\u0435\u043c\u043e \u0432 \u0437\u0430\u043f\u0438\u0441\u0430\u0445 \u043f\u043e\u0441\u0442\u0435\u0440 \u0442\u0435\u043b\u0435\u0448\u043e\u0443. \u0420\u0435\u0430\u043b\u0456\u0437\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0443 \u0446\u044c\u043e\u043c\u0443 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u0456 \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u043c\u043e, \u043e\u0431\u043c\u0435\u0436\u0438\u043c\u043e\u0441\u044f \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0438\u043c \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c. \u041f\u0440\u043e\u0446\u0435\u0441 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u0432 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u0445 \u0443\u0440\u043e\u043a\u0430\u0445.<\/p>\n<p>\u041f\u043e-\u043f\u0435\u0440\u0448\u0435, \u0434\u043e\u0434\u0430\u043c\u043e \u0446\u044e \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u0456\u0441\u0442\u044c \u0443 \u043c\u043e\u0434\u0435\u043b\u044c <strong>TvShow<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">[Required(ErrorMessage = \"Enter movie 'Poster'\")]\r\n        [DataType(DataType.Url)]\r\n        [Display(Name = \"Poster\")]\r\n        public string? ImageUrl { get; set; }<\/pre>\n<p>\u0414\u0430\u043b\u0456 \u043c\u0438 \u0431\u0443\u0434\u0435\u043c\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 Code First Migrations \u0434\u043b\u044f \u0434\u043e\u0434\u0430\u0432\u0430\u043d\u043d\u044f \u0446\u044c\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044e db. \u0412\u0456\u0434\u043a\u0440\u0438\u0439\u0442\u0435 <strong>Tools<\/strong> -&gt; <strong>NuGet Package Manager<\/strong> &gt; <strong>Package Manager Console<\/strong> (PMC) \u0456 \u0432\u0438\u043a\u043e\u043d\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 PMC:<\/p>\n<pre class=\"lang:default decode:true \">PM&gt; Add-Migration AddImageUrl<\/pre>\n<p>\u041f\u0456\u0441\u043b\u044f, \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre class=\"lang:default decode:true \">PM&gt; Update-Database<\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440 \u043e\u043d\u043e\u0432\u0438\u043c\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <strong>[Bind]<\/strong> \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0456\u0432 <strong>Create<\/strong> \u0456 <strong>Edit<\/strong> POST \u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0456 <strong>TvShowsController.cs<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">[Bind(\"Id,Title,Genre,Rating,ImdbUrl,ImageUrl\")]<\/pre>\n<p>\u0414\u0430\u043b\u0456 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0434\u0430\u043d\u043d\u044f <strong>Index<\/strong>, <strong>Create<\/strong>, <strong>Edit<\/strong>, \u0449\u043e\u0431 \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u0438 \u0446\u0435 \u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0435.<\/p>\n<p>\u0414\u043e\u0434\u0430\u0439\u0442\u0435 \u0443 \u0444\u0430\u0439\u043b<strong> Edit.cshtml<\/strong> \u0456 <strong>Create.cshtml<\/strong> \u0442\u0430\u043a\u0443 \u0447\u0430\u0441\u0442\u0438\u043d\u0443 \u043a\u043e\u0434\u0443:<\/p>\n<pre class=\"lang:default decode:true \">&lt;div class=\"form-group\"&gt;\r\n                &lt;label asp-for=\"ImageUrl\" class=\"control-label\"&gt;&lt;\/label&gt;\r\n                &lt;input asp-for=\"ImageUrl\" class=\"form-control\" \/&gt;\r\n                &lt;span asp-validation-for=\"ImageUrl\" class=\"text-danger\"&gt;&lt;\/span&gt;\r\n            &lt;\/div&gt;<\/pre>\n<p>\u0422\u0430\u043a \u0441\u0430\u043c\u043e, \u0437\u043c\u0456\u043d\u0438\u043c\u043e \u0444\u0430\u0439\u043b <strong>Index.cshtml<\/strong> \u0442\u0430\u043a\u0438\u043c \u0447\u0438\u043d\u043e\u043c:<\/p>\n<pre class=\"lang:default decode:true \">&lt;table class=\"table\"&gt;\r\n    &lt;thead&gt;\r\n        &lt;tr&gt;\r\n            &lt;th&gt;\r\n                @Html.DisplayNameFor(model =&gt; model.ImageUrl)\r\n            &lt;\/th&gt;\r\n            &lt;th&gt;\r\n                @Html.DisplayNameFor(model =&gt; model.Genre)\r\n            &lt;\/th&gt;\r\n            &lt;th&gt;\r\n                @Html.DisplayNameFor(model =&gt; model.Rating)\r\n            &lt;\/th&gt;\r\n            &lt;th&gt;\r\n                @Html.DisplayNameFor(model =&gt; model.ImdbUrl)\r\n            &lt;\/th&gt;\r\n            &lt;th&gt;&lt;\/th&gt;\r\n        &lt;\/tr&gt;\r\n    &lt;\/thead&gt;\r\n    &lt;tbody&gt;\r\n        @foreach (var item in Model)\r\n        {\r\n            &lt;tr&gt;\r\n                &lt;td&gt;\r\n                    @if (item.ImageUrl is not null &amp;&amp; item.ImageUrl.Length &gt; 0)\r\n                    {\r\n                        &lt;img src=\"@Url.Content(item.ImageUrl)\" alt=\"@item.Title\" \/&gt;\r\n                    }\r\n                &lt;\/td&gt;\r\n                &lt;td&gt;\r\n                    @Html.DisplayFor(modelItem =&gt; item.Title)\r\n                &lt;\/td&gt;\r\n                &lt;td&gt;\r\n                    @Html.DisplayFor(modelItem =&gt; item.Genre)\r\n                &lt;\/td&gt;\r\n                &lt;td&gt;\r\n                    @Html.DisplayFor(modelItem =&gt; item.Rating)\r\n                &lt;\/td&gt;\r\n                &lt;td&gt;\r\n                    @*@Html.DisplayFor(modelItem =&gt; item.ImdbUrl)*@\r\n                    &lt;a href=\"@item.ImdbUrl\" target=\"_blank\"&gt;@item.Title&lt;\/a&gt;\r\n                &lt;\/td&gt;\r\n                &lt;td&gt;\r\n                    &lt;a asp-action=\"Edit\" asp-route-id=\"@item.Id\"&gt;Edit&lt;\/a&gt; |\r\n                    &lt;a asp-action=\"Details\" asp-route-id=\"@item.Id\"&gt;Details&lt;\/a&gt; |\r\n                    &lt;a asp-action=\"Delete\" asp-route-id=\"@item.Id\"&gt;Delete&lt;\/a&gt;\r\n                &lt;\/td&gt;\r\n            &lt;\/tr&gt;\r\n        }\r\n    &lt;\/tbody&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<p>\u0423 \u0432\u0435\u0440\u0445\u043d\u0456\u0439 \u0447\u0430\u0441\u0442\u0438\u043d\u0456 \u0444\u0430\u0439\u043b\u0443 <strong>Index.cstml<\/strong> \u0434\u043e\u0434\u0430\u043c\u043e \u0441\u0442\u0438\u043b\u0456\u0432 \u0434\u043b\u044f \u043a\u043e\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u043f\u043e\u0441\u0442\u0435\u0440\u0456\u0432 \u0444\u0456\u043b\u044c\u043c\u0456\u0432:<\/p>\n<pre class=\"lang:default decode:true \">&lt;style&gt;\r\n    img{\r\n        width:180px;\r\n        height:250px;\r\n    }\r\n&lt;\/style&gt;<\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0456 \u0432\u0438\u043a\u043e\u043d\u0430\u0439\u0442\u0435 \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f \u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0443, \u0434\u043e\u0434\u0430\u0432\u0448\u0438 \u0434\u043e \u043d\u044c\u043e\u0433\u043e \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f, \u0441\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u0437\u0430\u043f\u0438\u0441. \u041f\u0456\u0441\u043b\u044f, \u043f\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044c \u043d\u0430 \u0433\u043e\u043b\u043e\u0432\u043d\u0443 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u0456 \u043f\u043e\u0434\u0438\u0432\u0456\u0442\u044c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-449\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/15-min.png\" alt=\"asp.net cire movie site\" width=\"1176\" height=\"463\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/15-min.png 1176w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/15-min-300x118.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/15-min-1024x403.png 1024w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/15-min-768x302.png 768w\" sizes=\"auto, (max-width: 1176px) 100vw, 1176px\" \/><\/p>\n<h2 id=\"statsComponent\">\u0414\u043e\u0434\u0430\u0432\u0430\u043d\u043d\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438<\/h2>\n<p>\u041d\u0430\u043e\u0441\u0442\u0430\u043d\u043e\u043a, \u0434\u043e\u0434\u0430\u043c\u043e <strong>View Component<\/strong>, \u0434\u043b\u044f \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u0437\u0430 \u0444\u0456\u043b\u044c\u043c\u0430\u043c\u0438. \u0423 \u043a\u043e\u0440\u0435\u043d\u0456 \u043f\u0440\u043e\u0454\u043a\u0442\u0443 \u0441\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u043f\u0430\u043f\u043a\u0443 <strong>Components<\/strong> \u0456 \u0434\u043e\u0434\u0430\u043c\u043e \u0432 \u043d\u0435\u0457 \u043d\u043e\u0432\u0438\u0439 \u043a\u043b\u0430\u0441 <strong>StatisticsViewComponent.cs<\/strong>, \u0437 \u0442\u0430\u043a\u0438\u043c \u0432\u043c\u0456\u0441\u0442\u043e\u043c:<\/p>\n<pre class=\"lang:default decode:true \">public class StatisticsViewComponent : ViewComponent\r\n    {\r\n        private readonly ApplicationContext _context;\r\n\r\n        public StatisticsViewComponent(ApplicationContext context)\r\n        {\r\n            _context = context;\r\n        }\r\n        public async Task&lt;IViewComponentResult&gt; InvokeAsync()\r\n        {\r\n            var genreCount = await _context.TvShow.GroupBy(e =&gt; e.Genre).Select(e =&gt; new\r\n            {\r\n                Key = e.Key,\r\n                Count = e.Count()\r\n            }).ToDictionaryAsync(k =&gt; k.Key, c =&gt; c.Count);\r\n\r\n            return View(new StatisticsViewModel\r\n            {\r\n                GenreCount = genreCount,\r\n                TotalCount = genreCount.Values.Sum()\r\n            });\r\n        }\r\n    }\r\n<\/pre>\n<p>\u0423 \u043c\u0435\u0442\u043e\u0434\u0456<strong> InvokeAsync()<\/strong>, \u0440\u0430\u0445\u0443\u0454\u043c\u043e \u0437\u0430\u0433\u0430\u043b\u044c\u043d\u0443 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u0444\u0456\u043b\u044c\u043c\u0456\u0432, \u0430 \u0442\u0430\u043a\u043e\u0436 \u0437\u0433\u0440\u0443\u043f\u0443\u0432\u0430\u0432\u0448\u0438 \u0457\u0445 \u0437\u0430 \u0436\u0430\u043d\u0440\u0430\u043c\u0438. \u042f\u043a \u043c\u043e\u0434\u0435\u043b\u044c, \u043f\u0435\u0440\u0435\u0434\u0430\u0454\u043c\u043e \u0432 \u0447\u0430\u0441\u0442\u043a\u043e\u0432\u0435 \u043f\u043e\u0434\u0430\u043d\u043d\u044f <strong>Default.cshtml<\/strong>, \u044f\u043a\u0435 \u043c\u0438 \u0441\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u0442\u0440\u043e\u0445\u0438 \u043f\u0456\u0437\u043d\u0456\u0448\u0435.<\/p>\n<p>\u0423 \u043a\u043e\u0440\u0435\u043d\u0456 \u043f\u0440\u043e\u0454\u043a\u0442\u0443 \u0441\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u043f\u0430\u043f\u043a\u0443 <strong>ViewModels<\/strong>, \u0443 \u043d\u0456\u0439 \u0432\u0438\u0437\u043d\u0430\u0447\u0438\u043c\u043e \u043a\u043b\u0430\u0441 <strong>StatisticsViewModel.cs<\/strong>, \u0437 \u0442\u0430\u043a\u0438\u043c \u0432\u043c\u0456\u0441\u0442\u043e\u043c:<\/p>\n<pre class=\"lang:default decode:true \">public class StatisticsViewModel\r\n    {\r\n        public int TotalCount { get; set; }\r\n        public Dictionary&lt;Genre, int&gt; GenreCount { get; set; }\r\n    }\r\n<\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440 \u0441\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u043f\u043e\u0434\u0430\u043d\u043d\u044f, \u044f\u043a\u0435 \u0432\u0438\u0432\u043e\u0434\u0438\u0442\u0438\u043c\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u0456 \u0437 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u0430\u043d\u0456. \u0414\u043e\u0434\u0430\u043c\u043e \u0432 \u043f\u0430\u043f\u043a\u0443 <strong>Views<\/strong> \/ <strong>Shared<\/strong> \u043d\u043e\u0432\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u044f\u043a\u0438\u0439 \u043d\u0430\u0437\u0432\u0435\u043c\u043e <strong>Components<\/strong>. \u0410 \u0432 \u0446\u0435\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043e\u0434\u0430\u043c\u043e \u043f\u0430\u043f\u043a\u0443, \u044f\u043a\u0430 \u043d\u0430\u0437\u0438\u0432\u0430\u0454\u0442\u044c\u0441\u044f \u043d\u0430 \u0456\u043c&#8217;\u044f \u043d\u0430\u0448\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 &#8211; <strong>Statistics<\/strong>, \u0456 \u0432\u0438\u0437\u043d\u0430\u0447\u0438\u043c\u043e \u0432 \u043d\u0456\u0439 \u043d\u043e\u0432\u0435 \u043f\u043e\u0434\u0430\u043d\u043d\u044f <strong>Default.cshtml<\/strong> \u0437 \u0442\u0430\u043a\u0438\u043c \u0432\u043c\u0456\u0441\u0442\u043e\u043c:<\/p>\n<pre class=\"lang:default decode:true \">@using TvShows.ViewModels;\r\n@model StatisticsViewModel\r\n\r\n&lt;ul class=\"list-group\"&gt;\r\n    &lt;li class=\"list-group-item active\"&gt;Total TV shows: @Model.TotalCount&lt;\/li&gt;\r\n    @foreach (KeyValuePair&lt;Genre, int&gt; item in Model.GenreCount)\r\n    {\r\n        &lt;li class=\"list-group-item\"&gt;@item.Key - @item.Value&lt;\/li&gt;\r\n    }\r\n&lt;\/ul&gt;\r\n<\/pre>\n<p>\u041d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 <strong>Index.cshtm<\/strong>l, \u0432\u0438\u043a\u043b\u0438\u0447\u0435\u043c\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0442\u0435\u0433-\u0445\u0435\u043b\u043f\u0435\u0440\u0430 <strong>vc<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">&lt;vc:statistics&gt;&lt;\/vc:statistics&gt;<\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a \u043f\u0435\u0440\u0435\u0434 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c \u0442\u0435\u0433\u0430 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0437\u0430\u0440\u0435\u0454\u0441\u0442\u0440\u0443\u0432\u0430\u0442\u0438 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u044f\u043a tag-\u0445\u0435\u043b\u043f\u0435\u0440. \u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0443 \u0444\u0430\u0439\u043b <strong>_ViewImports.cshtml<\/strong> \u0443 \u043f\u0430\u043f\u0446\u0456 <strong>Views<\/strong> \u0434\u043e\u0434\u0430\u043c\u043e \u0442\u0430\u043a\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443:<\/p>\n<pre class=\"lang:default decode:true \">@addTagHelper *, TvShows<\/pre>\n<p>\u041d\u0430\u0437\u0432\u0430 \u0437\u0431\u0456\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0443, \u044f\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0437\u0431\u0456\u0433\u0430\u0454\u0442\u044c\u0441\u044f \u0437 \u043d\u0430\u0437\u0432\u043e\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0443.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0456 \u043f\u043e\u0434\u0438\u0432\u0438\u043c\u043e\u0441\u044f \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-431\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/17-min.png\" alt=\"\u0444\u0438\u043b\u044c\u043c\u044b asp.net core \" width=\"971\" height=\"796\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/17-min.png 971w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/17-min-300x246.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/17-min-768x630.png 768w\" sizes=\"auto, (max-width: 971px) 100vw, 971px\" \/><\/p>\n<p>\u0417\u0430 \u0442\u0430\u043a\u0438\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u043c \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0432\u043e\u0440\u044e\u0432\u0430\u0442\u0438 \u0432\u043b\u0430\u0441\u043d\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0456\u0432.<\/p>\n<p>\u041d\u0430 \u0446\u044c\u043e\u043c\u0443 \u0440\u043e\u0437\u0440\u043e\u0431\u043a\u0430 \u043f\u0440\u043e\u0454\u043a\u0442\u0443 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0456\u0439 ASP.NET Core MVC \u0456 EF Core \u043f\u0456\u0434\u0456\u0439\u0448\u043b\u0430 \u0434\u043e \u043a\u0456\u043d\u0446\u044f.<\/p>\n<p>\u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438 \u0432\u0438\u0445\u0456\u0434\u043d\u0438\u0439 \u043a\u043e\u0434 \u0443 \u043c\u043e\u0454\u043c\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0456\u0457 \u2014 <a href=\"https:\/\/github.com\/murzilaka2\/TvShows\">Github<\/a>.<\/p>\n<p>\u042f \u0441\u043f\u043e\u0434\u0456\u0432\u0430\u044e\u0441\u044f, \u0449\u043e \u0432\u0430\u043c \u0441\u043f\u043e\u0434\u043e\u0431\u0430\u043b\u043e\u0441\u044f \u0447\u0438\u0442\u0430\u0442\u0438 \u0446\u044e \u0441\u0442\u0430\u0442\u0442\u044e, \u0456 \u0432\u043e\u043d\u0430 \u0432\u0438\u044f\u0432\u0438\u043b\u0430\u0441\u044f \u043b\u0435\u0433\u043a\u043e\u044e \u0434\u043b\u044f \u0440\u043e\u0437\u0443\u043c\u0456\u043d\u043d\u044f. \u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u0434\u0430\u0439\u0442\u0435 \u043c\u0435\u043d\u0456 \u0437\u043d\u0430\u0442\u0438, \u044f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0454 \u044f\u043a\u0456\u0441\u044c \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u0456 \u0430\u0431\u043e \u0432\u0438\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044f.<\/p>\n<p>\u0422\u0430\u043a \u0441\u0430\u043c\u043e \u0432\u0430\u043c \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u0438 \u0446\u0456\u043a\u0430\u0432\u0430 \u043f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044f \u0441\u0442\u0430\u0442\u0442\u044f &#8211; <a href=\"https:\/\/dijix.com.ua\/blog\/uk\/generacziya-robots-txt-v-asp-net\/\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0456\u044f robots.txt \u0432 Asp.Net<\/a>.<\/p>\n<hr \/>\n<h4><strong>\u0412\u0438 \u0445\u043e\u0447\u0435\u0442\u0435 \u043d\u0430\u0432\u0447\u0438\u0442\u0438\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u0438 \u043a\u043e\u0434 \u043c\u043e\u0432\u043e\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443\u0432\u0430\u043d\u043d\u044f C#?<\/strong><\/h4>\n<p>\u0421\u0442\u0432\u043e\u0440\u044e\u0432\u0430\u0442\u0438 \u0440\u0456\u0437\u043d\u0456 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u0439\u043d\u0456 \u0441\u0438\u0441\u0442\u0435\u043c\u0438, \u0449\u043e \u0441\u043a\u043b\u0430\u0434\u0430\u044e\u0442\u044c\u0441\u044f \u0437 \u0441\u0430\u0439\u0442\u0456\u0432, \u043c\u043e\u0431\u0456\u043b\u044c\u043d\u0438\u0445 \u043a\u043b\u0456\u0454\u043d\u0442\u0456\u0432, \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u0438\u0445 \u0434\u043e\u0434\u0430\u0442\u043a\u0456\u0432, \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u0431\u043e\u0442\u0456\u0432 \u0442\u043e\u0449\u043e.<\/p>\n<p><a href=\"https:\/\/dijix.com.ua\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-94 size-full\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/logog-brand.png\" alt=\"\" width=\"355\" height=\"77\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/logog-brand.png 355w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/logog-brand-300x65.png 300w\" sizes=\"auto, (max-width: 355px) 100vw, 355px\" \/><\/a><\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u044c\u0442\u0435 \u0434\u043e \u043d\u0430\u0441 \u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 Dijix \u0456 \u043e\u0437\u043d\u0430\u0439\u043e\u043c\u0442\u0435\u0441\u044f \u0437 \u0443\u043c\u043e\u0432\u0430\u043c\u0438 \u043d\u0430\u0432\u0447\u0430\u043d\u043d\u044f, \u043c\u0438 \u0441\u043f\u0435\u0446\u0456\u0430\u043b\u0456\u0437\u0443\u0454\u043c\u043e\u0441\u044f \u0442\u0456\u043b\u044c\u043a\u0438 \u043d\u0430 \u0456\u043d\u0434\u0438\u0432\u0456\u0434\u0443\u0430\u043b\u044c\u043d\u0438\u0445 \u0437\u0430\u043d\u044f\u0442\u0442\u044f\u0445, \u044f\u043a \u0434\u043b\u044f \u043f\u043e\u0447\u0430\u0442\u043a\u0456\u0432\u0446\u0456\u0432, \u0442\u0430\u043a \u0456 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0443\u043d\u0443\u0442\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0456\u0441\u0442\u0456\u0432. \u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u0438 \u044f\u043a \u043e\u0434\u043d\u0435 \u0437\u0430\u043d\u044f\u0442\u0442\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0430\u0446\u044e\u0432\u0430\u043d\u043d\u044f \u043f\u0438\u0442\u0430\u043d\u043d\u044f, \u0449\u043e \u0432\u0430\u0441 \u0446\u0456\u043a\u0430\u0432\u0438\u0442\u044c, \u0442\u0430\u043a \u0456 \u043a\u0456\u043b\u044c\u043a\u0430, \u0434\u043b\u044f \u0431\u0456\u043b\u044c\u0448 \u0449\u0456\u043b\u044c\u043d\u043e\u0457 \u0440\u043e\u0431\u043e\u0442\u0438. \u0417\u0430\u0432\u0434\u044f\u043a\u0438 \u043e\u0441\u043e\u0431\u0438\u0441\u0442\u043e\u043c\u0443 \u043a\u0430\u0431\u0456\u043d\u0435\u0442\u0443, \u043a\u043e\u0436\u0435\u043d \u0441\u0442\u0443\u0434\u0435\u043d\u0442 \u043f\u0456\u0434\u0432\u0438\u0449\u0438\u0442\u044c \u044f\u043a\u0456\u0441\u0442\u044c \u0441\u0432\u043e\u0433\u043e \u043d\u0430\u0432\u0447\u0430\u043d\u043d\u044f, \u0443 \u0432\u0430\u0448\u043e\u043c\u0443 \u0440\u043e\u0437\u043f\u043e\u0440\u044f\u0434\u0436\u0435\u043d\u043d\u0456:<\/p>\n<ul>\n<li>\u0414\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0456\u0430\u043b\u0443<\/li>\n<li>\u0422\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u0456 \u0441\u0442\u0430\u0442\u0442\u0456<\/li>\n<li>\u0411\u0456\u0431\u043b\u0456\u043e\u0442\u0435\u043a\u0430 \u043a\u043d\u0438\u0433<\/li>\n<li>\u041e\u043d\u043b\u0430\u0439\u043d \u0442\u0435\u0441\u0442\u0443\u0432\u0430\u043d\u043d\u044f<\/li>\n<li>\u0421\u043f\u0456\u043b\u043a\u0443\u0432\u0430\u043d\u043d\u044f \u0432 \u0437\u0430\u043a\u0440\u0438\u0442\u0438\u0445 \u0433\u0440\u0443\u043f\u0430\u0445<\/li>\n<\/ul>\n<blockquote>\n<p style=\"text-align: right;\"><a href=\"https:\/\/dijix.com.ua\/uk\/\">https:\/\/dijix.com.ua<\/a><\/p>\n<p style=\"text-align: right;\"><a href=\"https:\/\/ms.dijix.com.ua\/\">\u0416\u0438\u0432\u0438 \u0443 \u0441\u0432\u043e\u0454\u043c\u0443 \u0441\u0432\u0456\u0442\u0456, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443\u0439 \u0443 \u043d\u0430\u0448\u043e\u043c\u0443<\/a>.<\/p>\n<\/blockquote>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423 \u0446\u0456\u0439 \u0441\u0442\u0430\u0442\u0442\u0456 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u043f\u0440\u043e\u0446\u0435\u0441 \u043f\u043e\u0431\u0443\u0434\u043e\u0432\u0438 \u0440\u0435\u0430\u043b\u0456\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0454\u043a\u0442\u0443, \u044f\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0443\u0454 \u0441\u043f\u0456\u043b\u044c\u043d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f ASP.NET Core MVC \u0456 Entity Framework Core. \u041f\u0440\u043e\u0454\u043a\u0442 \u0431\u0443\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u0438\u043c, \u0430\u043b\u0435 \u0431\u043b\u0438\u0437\u044c\u043a\u0438\u043c \u0434\u043e&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/\">Continue reading<span class=\"screen-reader-text\">\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":456,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"uk","_original_post":"https:\/\/dijix.com.ua\/blog\/?p=430","footnotes":""},"categories":[8],"tags":[],"class_list":["post-457","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-net-core","uk","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core - Dijix - \u0411\u043b\u043e\u0433<\/title>\r\n<meta name=\"description\" content=\"\u0423 \u0446\u0456\u0439 \u0441\u0442\u0430\u0442\u0442\u0456 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u043f\u0440\u043e\u0446\u0435\u0441 \u043f\u043e\u0431\u0443\u0434\u043e\u0432\u0438 \u0440\u0435\u0430\u043b\u0456\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0454\u043a\u0442\u0443, \u044f\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0443\u0454 \u0441\u043f\u0456\u043b\u044c\u043d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f ASP.NET Core MVC \u0456 Entity Framework Core.\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/\" \/>\r\n<meta property=\"og:locale\" content=\"uk_UA\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core - Dijix - \u0411\u043b\u043e\u0433\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/\" \/>\r\n<meta property=\"og:site_name\" content=\"Dijix - \u0411\u043b\u043e\u0433\" \/>\r\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Dijixs\" \/>\r\n<meta property=\"article:published_time\" content=\"2023-02-06T09:56:18+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/mockup-m.146110bc-min.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"710\" \/>\r\n\t<meta property=\"og:image:height\" content=\"450\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u0431\u043b. \u0447\u0430\u0441 \u0447\u0438\u0442\u0430\u043d\u043d\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 \u0445\u0432\u0438\u043b\u0438\u043d\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/\"},\"author\":{\"name\":\"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/4ce2240cdf3db189e17ca0ff422a0c3d\"},\"headline\":\"\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core\",\"datePublished\":\"2023-02-06T09:56:18+00:00\",\"dateModified\":\"2023-02-06T09:56:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/\"},\"wordCount\":1635,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/#organization\"},\"articleSection\":[\"Asp.Net Core\"],\"inLanguage\":\"uk\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/\",\"url\":\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/\",\"name\":\"\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core - Dijix - \u0411\u043b\u043e\u0433\",\"isPartOf\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/#website\"},\"datePublished\":\"2023-02-06T09:56:18+00:00\",\"dateModified\":\"2023-02-06T09:56:18+00:00\",\"description\":\"\u0423 \u0446\u0456\u0439 \u0441\u0442\u0430\u0442\u0442\u0456 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u043f\u0440\u043e\u0446\u0435\u0441 \u043f\u043e\u0431\u0443\u0434\u043e\u0432\u0438 \u0440\u0435\u0430\u043b\u0456\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0454\u043a\u0442\u0443, \u044f\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0443\u0454 \u0441\u043f\u0456\u043b\u044c\u043d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f ASP.NET Core MVC \u0456 Entity Framework Core.\",\"breadcrumb\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/#breadcrumb\"},\"inLanguage\":\"uk\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\/\/dijix.com.ua\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#website\",\"url\":\"https:\/\/dijix.com.ua\/blog\/\",\"name\":\"Dijix - \u0411\u043b\u043e\u0433\",\"description\":\"\ud83d\udc9c\",\"publisher\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dijix.com.ua\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"uk\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#organization\",\"name\":\"Dijix - \u0411\u043b\u043e\u0433\",\"url\":\"https:\/\/dijix.com.ua\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"uk\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/\u0421\u043d\u0438\u043c\u043e\u043a.png\",\"contentUrl\":\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/\u0421\u043d\u0438\u043c\u043e\u043a.png\",\"width\":159,\"height\":92,\"caption\":\"Dijix - \u0411\u043b\u043e\u0433\"},\"image\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Dijixs\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/4ce2240cdf3db189e17ca0ff422a0c3d\",\"name\":\"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"uk\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e3e8fa72f5adf168d30934fb574a97a5e812e7d6e2795075f0e7ea19311e3ba9?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e3e8fa72f5adf168d30934fb574a97a5e812e7d6e2795075f0e7ea19311e3ba9?s=96&d=monsterid&r=g\",\"caption\":\"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430\"},\"sameAs\":[\"https:\/\/dijix.com.ua\/blog\"],\"url\":\"https:\/\/dijix.com.ua\/blog\/author\/admin\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core - Dijix - \u0411\u043b\u043e\u0433","description":"\u0423 \u0446\u0456\u0439 \u0441\u0442\u0430\u0442\u0442\u0456 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u043f\u0440\u043e\u0446\u0435\u0441 \u043f\u043e\u0431\u0443\u0434\u043e\u0432\u0438 \u0440\u0435\u0430\u043b\u0456\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0454\u043a\u0442\u0443, \u044f\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0443\u0454 \u0441\u043f\u0456\u043b\u044c\u043d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f ASP.NET Core MVC \u0456 Entity Framework Core.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/","og_locale":"uk_UA","og_type":"article","og_title":"\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core - Dijix - \u0411\u043b\u043e\u0433","og_url":"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/","og_site_name":"Dijix - \u0411\u043b\u043e\u0433","article_publisher":"https:\/\/www.facebook.com\/Dijixs","article_published_time":"2023-02-06T09:56:18+00:00","og_image":[{"width":710,"height":450,"url":"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2023\/02\/mockup-m.146110bc-min.png","type":"image\/png"}],"author":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430","\u041f\u0440\u0438\u0431\u043b. \u0447\u0430\u0441 \u0447\u0438\u0442\u0430\u043d\u043d\u044f":"15 \u0445\u0432\u0438\u043b\u0438\u043d"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/#article","isPartOf":{"@id":"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/"},"author":{"name":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430","@id":"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/4ce2240cdf3db189e17ca0ff422a0c3d"},"headline":"\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core","datePublished":"2023-02-06T09:56:18+00:00","dateModified":"2023-02-06T09:56:18+00:00","mainEntityOfPage":{"@id":"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/"},"wordCount":1635,"commentCount":0,"publisher":{"@id":"https:\/\/dijix.com.ua\/blog\/#organization"},"articleSection":["Asp.Net Core"],"inLanguage":"uk","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/","url":"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/","name":"\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core - Dijix - \u0411\u043b\u043e\u0433","isPartOf":{"@id":"https:\/\/dijix.com.ua\/blog\/#website"},"datePublished":"2023-02-06T09:56:18+00:00","dateModified":"2023-02-06T09:56:18+00:00","description":"\u0423 \u0446\u0456\u0439 \u0441\u0442\u0430\u0442\u0442\u0456 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u043f\u0440\u043e\u0446\u0435\u0441 \u043f\u043e\u0431\u0443\u0434\u043e\u0432\u0438 \u0440\u0435\u0430\u043b\u0456\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0454\u043a\u0442\u0443, \u044f\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0443\u0454 \u0441\u043f\u0456\u043b\u044c\u043d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f ASP.NET Core MVC \u0456 Entity Framework Core.","breadcrumb":{"@id":"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/#breadcrumb"},"inLanguage":"uk","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dijix.com.ua\/blog\/uk\/sozdanie-prilozheniya-s-ispolzovaniem-asp-net-core-mvc-i-ef-core\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/dijix.com.ua\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c ASP.NET Core MVC \u0456 EF Core"}]},{"@type":"WebSite","@id":"https:\/\/dijix.com.ua\/blog\/#website","url":"https:\/\/dijix.com.ua\/blog\/","name":"Dijix - \u0411\u043b\u043e\u0433","description":"\ud83d\udc9c","publisher":{"@id":"https:\/\/dijix.com.ua\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dijix.com.ua\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"uk"},{"@type":"Organization","@id":"https:\/\/dijix.com.ua\/blog\/#organization","name":"Dijix - \u0411\u043b\u043e\u0433","url":"https:\/\/dijix.com.ua\/blog\/","logo":{"@type":"ImageObject","inLanguage":"uk","@id":"https:\/\/dijix.com.ua\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/\u0421\u043d\u0438\u043c\u043e\u043a.png","contentUrl":"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/08\/\u0421\u043d\u0438\u043c\u043e\u043a.png","width":159,"height":92,"caption":"Dijix - \u0411\u043b\u043e\u0433"},"image":{"@id":"https:\/\/dijix.com.ua\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Dijixs"]},{"@type":"Person","@id":"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/4ce2240cdf3db189e17ca0ff422a0c3d","name":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430","image":{"@type":"ImageObject","inLanguage":"uk","@id":"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e3e8fa72f5adf168d30934fb574a97a5e812e7d6e2795075f0e7ea19311e3ba9?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e3e8fa72f5adf168d30934fb574a97a5e812e7d6e2795075f0e7ea19311e3ba9?s=96&d=monsterid&r=g","caption":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430"},"sameAs":["https:\/\/dijix.com.ua\/blog"],"url":"https:\/\/dijix.com.ua\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/posts\/457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/comments?post=457"}],"version-history":[{"count":1,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/posts\/457\/revisions"}],"predecessor-version":[{"id":458,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/posts\/457\/revisions\/458"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/media\/456"}],"wp:attachment":[{"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/media?parent=457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/categories?post=457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/tags?post=457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}