{"id":248,"date":"2022-09-27T10:40:46","date_gmt":"2022-09-27T10:40:46","guid":{"rendered":"https:\/\/dijix.com.ua\/blog\/?p=248"},"modified":"2023-02-02T15:53:38","modified_gmt":"2023-02-02T15:53:38","slug":"magazin-na-asp-net-core-mvc-ef-chast-5","status":"publish","type":"post","link":"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/","title":{"rendered":"\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5"},"content":{"rendered":"<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core \u0438 Entity Framework Core. \u0412 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0443\u0437\u043d\u0430\u043b\u0438 \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 GameStore \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043a \u043d\u0435\u043c\u0443 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.\u00a0 \u0414\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043f\u043e <a href=\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-4\/\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f GameStore, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u044b, \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0437\u0438\u043d\u0443 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0438 \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0442\u044c \u0437\u0430\u043a\u0430\u0437. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0432 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 ASP.NET Core MVC \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0435 Entity Framework Core, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0432 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0433\u043b\u0430\u0432\u0430\u0445.<\/p>\n<h2>\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5<\/h2>\n<p><a href=\"#importviews\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/a><\/p>\n<p><a href=\"#updatedata\">\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<p><a href=\"#adddata\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0442\u043e\u0432\u0430\u0440\u0430\u0445<\/a><\/p>\n<p><a href=\"#addmigration\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/a><\/p>\n<p><a href=\"#cart\">\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f<\/a><\/p>\n<p><a href=\"#returnurl\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 URL \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430<\/a><\/p>\n<p><a href=\"#addcartforproducts\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a<\/a><\/p>\n<p><a href=\"#cartmodel\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 Cart<\/a><\/p>\n<p><a href=\"#addcontroller\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/a><\/p>\n<p><a href=\"#createview\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439<\/a><\/p>\n<p>\u0418\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0442\u0438\u0441\u044c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0442\u0435\u043c\u043f\u0430\u043c\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c ASP.NET Core \u041cV\u0421 \u043f\u043e\u0432\u0435\u0440\u0445 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430, \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b Entity F\u0433amework Core \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0433\u043b\u0430\u0432\u0430\u0445.<\/p>\n<h2 id=\"importviews\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0433\u043b\u0430\u0432\u0435 \u043a\u043b\u0430\u0441\u0441 <strong>PagedList<\/strong> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u0431\u0435\u0437 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c, \u0432\u043d\u0435\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u0433\u043b\u0430\u0432\u0435 \u043a\u043b\u0430\u0441\u0441 PagedList \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0432 \u0444\u0430\u0439\u043b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 <strong>Views<\/strong> \/ <strong>_ViewImports.cshtml<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">@using GameStore\r\n@using GameStore.Models\r\n@using GameStore.Models.Pages\r\n@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers\r\n<\/pre>\n<h2 id=\"updatedata\">\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>\u0427\u0442\u043e \u0431\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043a\u043b\u0430\u0441\u0441 <strong>Product<\/strong> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <strong>Description<\/strong>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u043e \u0442\u043e\u0432\u0430\u0440\u0435:<\/p>\n<pre class=\"lang:default decode:true \">public class Product\r\n    {\r\n        public int Id { get; set; }\r\n        public string Name { get; set; }\r\n        public string Description { get; set; }\r\n        public decimal PurchasePrice { get; set; }\r\n        public decimal RetailPrice { get; set; }\r\n\r\n        public int CategoryId { get; set; }\r\n        public Category Category { get; set; }\r\n    }\r\n<\/pre>\n<p>\u0414\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043a\u043b\u0430\u0441\u0441 <strong>\u0421\u0430<\/strong><strong>tegory<\/strong> \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 Entity Framework Core \u0441\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 <strong>Product<\/strong><strong>:<\/strong><\/p>\n<pre class=\"lang:default decode:true \">{\r\n        public int Id { get; set; }\r\n        public string Name { get; set; }\r\n        public string Description { get; set; }\r\n\r\n        public IEnumerable&lt;Product&gt; Products { get; set; }\r\n    }\r\n<\/pre>\n<h2 id=\"adddata\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0442\u043e\u0432\u0430\u0440\u0430\u0445<\/h2>\n<p>\u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0421 \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 <strong>Seed<\/strong> \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u0438 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 <strong>GameStore, <\/strong>\u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <strong>CreateProductionData<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">public class SeedController : Controller\r\n    {\r\n        \/\/...\r\n        [HttpPost]\r\n        public IActionResult CreateProductionData()\r\n        {\r\n            ClearData();\r\n            _context.Categories.AddRange\r\n                (\r\n                    new Category\r\n                    {\r\n                        Name = \"\u0428\u0443\u0442\u0435\u0440\u044b\",\r\n                        Description = \"\u041d\u0430\u0434\u0435\u043b\u0430\u0439 \u0448\u0443\u043c\u0443\",\r\n                        Products = new Product[]\r\n                    {\r\n                        new Product { Name = \"WarZone\", Description = \"\u041c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u0430\u044f \u0438\u0433\u0440\u0430 \u0432 \u0436\u0430\u043d\u0440\u0435 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0448\u0443\u0442\u0435\u0440\u0430 \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043b\u0438\u0446\u0430.\",\r\n                        PurchasePrice = 50, RetailPrice = 70},\r\n                         new Product { Name = \"DOOM Eternal\", Description = \"DOOM Eternal \u0441\u043c\u043e\u0433\u043b\u0430 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0438 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0448\u0443\u0442\u0435\u0440\u0430 \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0441\u043b\u044d\u0448\u0435\u0440\u0430.\",\r\n                        PurchasePrice = 76, RetailPrice = 90},\r\n                          new Product { Name = \"Battlefield V\", Description = \"\u0412 2019 \u0433\u043e\u0434\u0443 Infinity Ward \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u0443\u044e \u0442\u043e\u043f\u043e\u0432\u0443\u044e Call of Duty \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442. \",\r\n                        PurchasePrice = 100, RetailPrice = 120},\r\n                           new Product { Name = \"Wolfenstein 2\", Description = \"Bulletstorm \u0441\u0442\u0430\u043b\u0430 \u043b\u0435\u0431\u0435\u0434\u0438\u043d\u043e\u0439 \u043f\u0435\u0441\u043d\u0435\u0439 \u0441\u0442\u0443\u0434\u0438\u0438 People Can Fly. \u042d\u0442\u043e \u043d\u0430\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u043d\u0430\u043b\u0438\u043d\u043e\u043c \u0448\u0443\u0442\u0435\u0440 \u0441 \u043e\u0442\u043c\u043e\u0440\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u043d\u0430\u0451\u043c\u043d\u0438\u043a\u043e\u043c \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0440\u043e\u043b\u0438.\",\r\n                        PurchasePrice = 35, RetailPrice = 50},\r\n                    }\r\n                    },\r\n                     new Category\r\n                     {\r\n                         Name = \"\u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438\",\r\n                         Description = \"\u0414\u0443\u043c\u0430\u0439 \u0447\u0435\u043c \u043c\u043e\u0436\u0435\u0448\u044c\",\r\n                         Products = new Product[]\r\n                    {\r\n                        new Product { Name = \"Civilization 5\", Description = \"\u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u043b\u0443\u0447\u0448\u0430\u044f \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u00ab\u0426\u0438\u0432\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438\u00bb. \u0412 \u043c\u0435\u0440\u0443 \u0433\u043b\u0443\u0431\u043e\u043a\u0430\u044f \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u0430\",\r\n                        PurchasePrice = 50, RetailPrice = 70},\r\n                         new Product { Name = \"Age of Empires 2\", Description = \"\u0412\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c AOE \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \",\r\n                        PurchasePrice = 76, RetailPrice = 90},\r\n                          new Product { Name = \"Warcraft 3 \", Description = \"\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u0438\u043d\u0446\u0430 \u0410\u0440\u0442\u0430\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0434\u0430\u043b \u0434\u0443\u0448\u0443 \u0440\u0430\u0434\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u043d\u0430\u0440\u043e\u0434\u0430, \u0437\u043d\u0430\u043a\u043e\u043c\u0430 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u043c \u0438\u0433\u0440\u043e\u043a\u043e\u0432.\",\r\n                        PurchasePrice = 100, RetailPrice = 120},\r\n                           new Product { Name = \"SimCity 4 \", Description = \"\u0427\u0435\u0442\u0432\u0451\u0440\u0442\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0433\u0440\u0430\u0434\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u043e\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044f The Sims \u0423\u0438\u043b\u043b\u0430 \u0420\u0430\u0439\u0442\u0430 \u043f\u043e \u043f\u0440\u0430\u0432\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043b\u0443\u0447\u0448\u0438\u0445 \u0438\u0433\u0440 \u0432 \u0436\u0430\u043d\u0440\u0435.\",\r\n                        PurchasePrice = 35, RetailPrice = 50},\r\n                    }\r\n                     },\r\n                      new Category\r\n                      {\r\n                          Name = \"\u0424\u0430\u0442\u0438\u043d\u0433\u0438\",\r\n                          Description = \"\u0423\u0434\u0430\u0440\u0438\u043b - \u0431\u0435\u0433\u0438\",\r\n                          Products = new Product[]\r\n                    {\r\n                        new Product { Name = \"Mortal Kombat 11\", Description = \"\u0421\u0430\u043c\u043e\u0435 \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u0437\u0434\u0430\u043d\u0438\u0435 Mortal Kombat 11. \u041f\u043e\u0433\u0440\u0443\u0436\u0430\u0439\u0442\u0435\u0441\u044c \u0432 \u0434\u0432\u0435 \u043a\u0438\u043d\u0435\u043c\u0430\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u044e\u0436\u0435\u0442\u043d\u044b\u0435 \u043a\u0430\u043c\u043f\u0430\u043d\u0438\u0438.\",\r\n                        PurchasePrice = 50, RetailPrice = 70},\r\n                         new Product { Name = \"Street Fighter V: Champion Edition\", Description = \"\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0447\u0430\u0441\u0442\u044c \u043b\u0435\u0433\u0435\u043d\u0434\u0430\u0440\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0444\u0430\u0439\u0442\u0438\u043d\u0433\u043e\u0432, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438 \u0437\u0430\u0440\u043e\u0434\u0438\u043b\u0441\u044f \u0436\u0430\u043d\u0440, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u0441\u0430\u043c\u043e\u0435 \u043a\u0440\u0443\u043f\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435.\",\r\n                        PurchasePrice = 76, RetailPrice = 90},\r\n                          new Product { Name = \"SOULCALIBUR VI\", Description = \"\u0414\u0443\u0448\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u044b\u043b\u0430\u0435\u0442 \u2013 \u0438 \u043f\u044b\u043b\u0430\u0435\u0442 \u043e\u043d\u0430 \u0435\u0449\u0435 \u044f\u0440\u0447\u0435 \u0438 \u043f\u0443\u0449\u0435 \u043f\u0440\u0435\u0436\u043d\u0435\u0433\u043e. \u0421\u0435\u0440\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0432\u043e\u0438\u043c \u043a\u043e\u0440\u043d\u044f\u043c \u0441 \u043b\u0435\u0433\u0435\u043d\u0434\u0430\u0440\u043d\u044b\u043c\u0438 \u043f\u043e\u0435\u0434\u0438\u043d\u043a\u0430\u043c\u0438 \u0441 \u043e\u0440\u0443\u0436\u0438\u0435\u043c.\",\r\n                        PurchasePrice = 100, RetailPrice = 120},\r\n                           new Product { Name = \"TEKKEN 7\", Description = \"\u0418 \u0432\u043e\u0442, \u0441\u043f\u0443\u0441\u0442\u044f 20 \u043b\u0435\u0442, \u0432\u043e\u0439\u043d\u0430 \u043c\u0435\u0436\u0434\u0443 \u0447\u043b\u0435\u043d\u0430\u043c\u0438 \u043a\u043b\u0430\u043d\u0430 \u041c\u0438\u0441\u0438\u043c\u0430, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0430 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043f\u043e\u0433\u0435\u044f.\",\r\n                        PurchasePrice = 35, RetailPrice = 50},\r\n                    }\r\n                      }\r\n\r\n                );\r\n            _context.SaveChanges();\r\n            return RedirectToAction(nameof(Index));\r\n        }       \r\n    }\r\n<\/pre>\n<p>\u041d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Category \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <strong>Products<\/strong> \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Product. \u0412\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u0443 <strong>AddRange<\/strong><strong>()<\/strong> \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0411\u0414 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <strong>SaveChanges<\/strong><strong>()<\/strong>.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0446\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <strong>Index<\/strong>, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c <strong>Seed<\/strong>, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442:<\/p>\n<pre class=\"lang:default decode:true \">&lt;div class=\"text-center p-3\"&gt;\r\n        &lt;button type=\"submit\" asp-action=\"CreateProductionData\" class=\"btn btn-primary\"&gt;\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u043c\u0438&lt;\/button&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 button \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u041d\u0422\u0413\u0420-\u0437\u0430\u043f\u0440\u043e\u0441 POST, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0411\u0414 \u0438 \u0435\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c\u0438 \u0438 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 <strong>Game<\/strong><strong>Store<\/strong>.<\/p>\n<h2 id=\"addmigration\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0411\u0414, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a \u043d\u0435\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e.<\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u043e\u043a\u043d\u0435 <strong>Package<\/strong> <strong>Manager<\/strong> <strong>Console<\/strong> \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre class=\"lang:default decode:true \">Add-Migration AddCustomer<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-249 aligncenter\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/1-7.png\" alt=\"add migration asp.net core\" width=\"404\" height=\"201\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/1-7.png 404w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/1-7-300x149.png 300w\" sizes=\"auto, (max-width: 404px) 100vw, 404px\" \/><\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u0432 \u043e\u043a\u043d\u0435 <strong>Package<\/strong> <strong>Manager<\/strong> <strong>Console<\/strong> \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre class=\"lang:default decode:true \">Update-Database<\/pre>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>AddCustomer<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0435\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0411\u0414 \u043a \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044e \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0412\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0442\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0411\u0414.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u201c\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\u201d \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u043c\u0438. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-250 aligncenter\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/2-6.png\" alt=\"asp.net core products list\" width=\"1443\" height=\"779\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/2-6.png 1443w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/2-6-300x162.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/2-6-1024x553.png 1024w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/2-6-768x415.png 768w\" sizes=\"auto, (max-width: 1443px) 100vw, 1443px\" \/><\/p>\n<h2 id=\"cart\">\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f<\/h2>\n<p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u043e\u00ad\u0432\u0430\u0440\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0435\u043c\u0443 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u044b \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c \u0438 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0438. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u043d\u0435\u0435.<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 <strong>Product<\/strong> \u043f\u043e \u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438, \u043d\u0430\u0447\u0430\u0432 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 <strong>IProduct<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">public interface IProduct\r\n    {\r\n        PagedList&lt;Product&gt; GetProducts(QueryOptions options, int category = 0);\r\n        IEnumerable&lt;Product&gt; GetAllProducts();\r\n        Product GetProduct(int id);\r\n        void AddProduct(Product product);\r\n        void UpdateProduct(Product product);\r\n        void UpdateAll(Product[] products);\r\n        void DeleteProduct(Product product);\r\n    }\r\n<\/pre>\n<p>\u0412\u043d\u0435\u0441\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u043a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f LINQ-\u043ce\u0442o\u0434 <strong>Where()<\/strong> \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043a\u043b\u044e\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 <strong>Product<\/strong> \u0441\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c <strong>Category<\/strong>, \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435<strong> ProductRepository<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">public class ProductRepository : IProduct\r\n    {\r\n        \/\/...\r\n        public PagedList&lt;Product&gt; GetProducts(QueryOptions options, int category = 0)\r\n        {\r\n            IQueryable&lt;Product&gt; products = _context.Products.Include(e =&gt; e.Category);\r\n            if (category != 0)\r\n            {\r\n                products = products.Where(e =&gt; e.CategoryId == category);\r\n            }\r\n            return new PagedList&lt;Product&gt;(products, options);\r\n        }\r\n    }\r\n<\/pre>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <strong>IQueryable<\/strong><strong>&lt;<\/strong><strong>T<\/strong><strong>&gt;<\/strong> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0411\u0414, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f. \u042d\u0442\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 IQueryable&lt;T&gt;, \u0445\u043e\u0442\u044f \u0435\u0441\u0442\u044c \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a &#8212; \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043f\u0440\u0435\u0434\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<h2 id=\"returnurl\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 URL \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430<\/h2>\n<p>\u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c, \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 URL \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0431\u0440\u0430\u043b \u0442\u043e\u0432\u0430\u0440. \u0414\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 <strong>Infrastructure<\/strong> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0435 \u0444\u0430\u0439\u043b \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>UrlExtensions<\/strong><strong>.<\/strong><strong>cs<\/strong> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u043e\u0434\u043e\u043c:<\/p>\n<pre class=\"lang:default decode:true \">public static class UrlExtensions\r\n    {\r\n        public static string PathAndQuery(this HttpRequest request)\r\n        {\r\n            return request.QueryString.HasValue ? $\"{request.Path}{request.QueryString}\" : request.Path.ToString();\r\n        }\r\n    }\r\n<\/pre>\n<p>\u0412 \u043a\u043b\u0430\u0441\u0441\u0435 <strong>UrlExtensions<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 <strong>PathAndQuery<\/strong><strong>()<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 form.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u0444\u0430\u0439\u043b <strong>Views<\/strong> \/ <strong>ViewImports<\/strong><strong>.<\/strong><strong>cshtml<\/strong>, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0443\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d:<\/p>\n<pre class=\"lang:default decode:true \">@using GameStore\r\n@using GameStore.Models\r\n@using GameStore.Models.Pages\r\n@using GameStore.Infrastructure\r\n@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers\r\n<\/pre>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 Store, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438<\/strong><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044e, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 <strong>Controllers<\/strong> \u0444\u0430\u0439\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>StoreController.cs<\/strong> \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre class=\"lang:default decode:true \">public class StoreController : Controller\r\n    {\r\n        private readonly IProduct _products;\r\n        private readonly ICategory _categories;\r\n\r\n        public StoreController(IProduct products, ICategory categories)\r\n        {\r\n            _products = products;\r\n            _categories = categories;\r\n        }\r\n        public IActionResult Index([FromQuery(Name = \"options\")] QueryOptions productOptions, QueryOptions catOptions, int category)\r\n        {\r\n            ViewBag.Categories = _categories.GetCategories(catOptions);\r\n            ViewBag.SelectedCategory = category;\r\n            return View(_products.GetProducts(productOptions, category));\r\n        }\r\n    }\r\n<\/pre>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 <strong>Product<\/strong> \u0438 <strong>Category<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <strong>QueryOptions<\/strong>. \u041e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 PagedList&lt;Product&gt;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043a\u0430\u043a \u0435\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u044c, \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 PagedList&lt;Category&gt;. \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u043a <strong>ViewBag<\/strong>.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0443, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 <strong>Views<\/strong> \/ <strong>Store<\/strong> \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0432 \u043d\u0435\u0435 \u0444\u0430\u0439\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 _<strong>Layout.cshtml<\/strong> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre class=\"lang:default decode:true \">&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n    &lt;meta charset=\"utf-8\" \/&gt;\r\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/&gt;\r\n    &lt;title&gt;@ViewData[\"Title\"] - GameStore&lt;\/title&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"~\/lib\/bootstrap\/dist\/css\/bootstrap.min.css\" \/&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"~\/css\/site.css\" asp-append-version=\"true\" \/&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"~\/GameStore.styles.css\" asp-append-version=\"true\" \/&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n    &lt;div class=\"container-fluid\"&gt;\r\n        &lt;div class=\"row bg-dark p-4 text-white\"&gt;\r\n            &lt;div class=\"col-auto\"&gt;&lt;h4&gt;\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u0438\u0433\u0440&lt;\/h4&gt;&lt;\/div&gt;\r\n            &lt;div class=\"col\"&gt;&lt;\/div&gt;\r\n            &lt;div class=\"col-auto text-right\"&gt;\r\n                (\u041a\u043e\u0440\u0437\u0438\u043d\u0430)\r\n            &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n\r\n    @RenderBody()\r\n\r\n    &lt;footer class=\"border-top footer text-muted\"&gt;\r\n        &lt;div class=\"container\"&gt;\r\n            &amp;copy; 2022 - GameStore - &lt;a asp-area=\"\" asp-controller=\"Home\" asp-action=\"Privacy\"&gt;Privacy&lt;\/a&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/footer&gt;\r\n    &lt;script src=\"~\/lib\/jquery\/dist\/jquery.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"~\/lib\/bootstrap\/dist\/js\/bootstrap.bundle.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"~\/js\/site.js\" asp-append-version=\"true\"&gt;&lt;\/script&gt;\r\n    @await RenderSectionAsync(\"Scripts\", required: false)\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u201c\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u0438\u0433\u0440, \u0441 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0435\u043c \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0432\u043e\u0434\u043a\u0438 \u043f\u043e \u043a\u043e\u0440\u0437\u0438\u043d\u0435 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0436\u0435. \u0414\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 <strong>Views<\/strong> \/ <strong>Store<\/strong> \u0444\u0430\u0439\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>Index.cshtml<\/strong> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre class=\"lang:default decode:true \">class=\"container-fluid\"&gt;\r\n    &lt;div class=\"row no-gutters\"&gt;\r\n        &lt;div class=\"col-auto\"&gt;\r\n            @Html.Partial(\"Categories\", ViewBag.Categories as PagedList&lt;Category&gt;)\r\n        &lt;\/div&gt;\r\n        &lt;div class=\"col\"&gt;\r\n            &lt;div class=\"container-fluid\"&gt;\r\n                &lt;div class=\"row pt-1 pb-1\"&gt;\r\n                    &lt;div class=\"col text-center\"&gt;\r\n                        @Html.Partial(\"Pages\", Model)\r\n                    &lt;\/div&gt;\r\n                &lt;\/div&gt;\r\n                &lt;div class=\"row pt-1 pb-1\"&gt;\r\n                    &lt;div class=\"col\"&gt;&lt;\/div&gt;\r\n                    &lt;div class=\"col-6 text-center form-group\"&gt;\r\n                        &lt;input form=\"pageform\" type=\"hidden\" name=\"options.searchpropertyname\" value=\"Name\" \/&gt;\r\n                        &lt;input form=\"pageform\" name=\"options.searchterm\" placeholder=\"\u041f\u043e\u0438\u0441\u043a...\" class=\"form-control\" \/&gt;\r\n                    &lt;\/div&gt;\r\n                    &lt;div class=\"col\"&gt;\r\n                        &lt;button form=\"pageform\" class=\"btn btn-secondary\" type=\"submit\"&gt;\u041f\u043e\u0438\u0441\u043a&lt;\/button&gt;\r\n                    &lt;\/div&gt;\r\n                    &lt;div class=\"col\"&gt;&lt;\/div&gt;\r\n                &lt;\/div&gt;\r\n                @foreach (Product p in Model)\r\n                {\r\n                    &lt;div class=\"row\"&gt;\r\n                        &lt;div class=\"col\"&gt;\r\n                            &lt;div class=\"car m-1 p-1 bg-light\"&gt;\r\n                                &lt;div class=\"bg-faded p-1\"&gt;\r\n                                    &lt;h4&gt;\r\n                                        @p.Name\r\n                                        &lt;span style=\"float:right\"&gt;\r\n                                            &lt;small&gt;@p.RetailPrice&lt;\/small&gt;\r\n                                        &lt;\/span&gt;\r\n                                    &lt;\/h4&gt;\r\n                                &lt;\/div&gt;\r\n                                &lt;form id=\"@p.Id\" asp-action=\"AddToCart\" asp-controller=\"Cart\" method=\"post\"&gt;\r\n                                    &lt;input type=\"hidden\" name=\"Id\" value=\"@p.Id\" \/&gt;\r\n                                    &lt;input type=\"hidden\" name=\"Name\" value=\"@p.Name\" \/&gt;\r\n                                    &lt;input type=\"hidden\" name=\"RetailPrice\" value=\"@p.RetailPrice\" \/&gt;\r\n                                    &lt;input type=\"hidden\" name=\"returnUrl\" value=\"@ViewContext.HttpContext.Request.PathAndQuery()\" \/&gt;\r\n                                    &lt;span class=\"card-text p-1\"&gt;\r\n                                        @(p.Description ?? \"\u041d\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\")\r\n                                        &lt;button type=\"submit\" class=\"btn btn-success btn-sm pull-right\" style=\"float:right\"&gt;\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443&lt;\/button&gt;\r\n                                    &lt;\/span&gt;\r\n                                &lt;\/form&gt;\r\n                            &lt;\/div&gt;\r\n                        &lt;\/div&gt;\r\n                    &lt;\/div&gt;\r\n\r\n                }\r\n            &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>\u0412 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 <strong>Index<\/strong> \u0441\u043e\u0431\u0440\u0430\u043d\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432, \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u043e\u0438\u0441\u043a\u0430. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 <strong>Views<\/strong> \/ <strong>Store<\/strong> \u0444\u0430\u0439\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>Categories.cshtml<\/strong> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre class=\"lang:default decode:true \">@model PagedList&lt;Category&gt;\r\n\r\n&lt;div class=\"container-fluid mt-4\"&gt;\r\n    &lt;div class=\"row no-gutters\"&gt;\r\n        &lt;div class=\"col mt-1\"&gt;\r\n            &lt;button form=\"pageform\" name=\"category\" value=\"0\" type=\"submit\"\r\n                    class=\"btn btn-block @(ViewBag.SelectedCategory == 0 ? \"btn-primary\":\"btn-outline-primary\")\"&gt;\r\n                \u0412\u0441\u0435\r\n            &lt;\/button&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n\r\n\r\n    &lt;div class=\"row no-gutters mt-4\"&gt;&lt;\/div&gt;\r\n    &lt;div class=\"row no-gutters\"&gt;\r\n        &lt;div class=\"col mt-1\"&gt;\r\n            &lt;button form=\"pageform\" name=\"catoptions.currentPage\" value=\"@(Model.CurrentPage - 1)\" class=\"btn btn-block btn-outline-secondary\r\n@(Model.HasPreviousPage ? \"disabled\":\"\")\" type=\"submit\"&gt;\r\n                \u041d\u0430\u0437\u0430\u0434\r\n            &lt;\/button&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n\r\n    @foreach (Category c in Model)\r\n    {\r\n        &lt;div class=\"row no-gutters\"&gt;\r\n            &lt;div class=\"col mt-1\"&gt;\r\n                &lt;button form=\"pageform\" name=\"category\" value=\"@c.Id\" type=\"submit\"\r\n                    class=\"btn blockquote @(ViewBag.SelectedCategory == c.Id ? \"btn-primary\":\"btn-outline-primary\")\"&gt;\r\n                    @c.Name\r\n                &lt;\/button&gt;\r\n            &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n    }\r\n    &lt;div class=\"row no-gutters\"&gt;\r\n        &lt;div class=\"col mt-1\"&gt;\r\n            &lt;button form=\"pageform\" name=\"catoptions.currentPage\" value=\"@(Model.CurrentPage + 1)\"\r\n                    class=\"btn blockquote btn-outline-secondary @(!Model.HasNextPage? \"disable\" : \"\")\" type=\"submit\"&gt;\r\n                \u0412\u043f\u0435\u0440\u0435\u0434\r\n            &lt;\/button&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <strong>Categories<\/strong> \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043a\u043d\u043e\u043f\u043a\u0438 <strong>Previous<\/strong> (\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f) \u0438 <strong>Next<\/strong> (\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f) \u0434\u043b\u044f \u043b\u0438\u0441\u0442\u0430\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430. \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b button, \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0449\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u041d\u0422\u041cL-\u0444\u043e\u0440\u043c\u0443 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>pagesform<\/strong> \u0434\u043b\u044f \u043d\u0430\u0446\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443:<\/p>\n<p><a href=\"https:\/\/localhost:7191\/store\">https:\/\/localhost:7191\/store<\/a><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0438\u0441\u043a, \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f, \u0432\u044b\u0431\u043e\u0440 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-251 aligncenter\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/3-6.png\" alt=\"asp.net core products list\" width=\"1309\" height=\"788\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/3-6.png 1309w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/3-6-300x181.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/3-6-1024x616.png 1024w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/3-6-768x462.png 768w\" sizes=\"auto, (max-width: 1309px) 100vw, 1309px\" \/><\/p>\n<p>\u041c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 Store \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0435\u0440\u0435\u0439\u0434\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <a href=\"https:\/\/localhost:7191\/seed\">https:\/\/localhost:7191\/seed<\/a> \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0439 \u043e\u0431\u044a\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0431\u044b\u043b\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0430, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a \u0442\u043e\u0432\u0430\u0440\u0443, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 <strong>Seed<\/strong>, \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <strong>CreateSeedData<\/strong><strong>()<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">public class SeedController : Controller\r\n    {\r\n        \/\/...\r\n        [HttpPost]\r\n        public IActionResult CreateSeedData(int count)\r\n        {\r\n            ClearData();\r\n            if (count &gt; 0)\r\n            {\r\n                _context.Database.SetCommandTimeout(TimeSpan.FromMinutes(10));\r\n                _context.Database.ExecuteSqlRaw(\"DROP PROCEDURE IF EXISTS CreateSeedData\");\r\n                _context.Database.ExecuteSqlRaw($@\"\r\n                CREATE PROCEDURE CreateSeedData \r\n                @RowCount decimal\r\n                AS\r\n                BEGIN\r\n                SET NOCOUNT ON\r\n                DECLARE @i INT = 0;\r\n                DECLARE @catId INT;\r\n                DECLARE @CatCount INT = @RowCount \/ 10;\r\n                DECLARE @pprice DECIMAL(5,2);\r\n                DECLARE @rprice DECIMAL(5,2);\r\n                BEGIN TRANSACTION\r\n                WHILE @i &lt; @CatCount\r\n                BEGIN \r\n                INSERT INTO Categories (Name,Description)\r\n                VALUES (CONCAT('Category-',@i),\r\n                'Test Data Category');\r\n                SET @catId = SCOPE_IDENTITY();\r\n                DECLARE @j INT = 1;\r\n                WHILE @j &lt;= 10\r\n                BEGIN\r\n                SET @pprice = RAND() * (500-5+1);\r\n                SET @rprice = (RAND() * @pprice) + @pprice;\r\n                INSERT INTO Products (Name,CategoryId,PurchasePrice,RetailPrice,Description)\r\n                VALUES (CONCAT('Product',@i,'-',@j),@catId,@pprice,@rprice,CONCAT('Description',@i,'-',@j))\r\n                SET @j = @j + 1\r\n                END\r\n                SET @i = @i + 1\r\n                END\r\n                COMMIT\r\n                END\");\r\n                _context.Database.BeginTransaction();\r\n                _context.Database.ExecuteSqlRaw($\"EXEC CreateSeedData @RowCount = {count}\");\r\n                _context.Database.CommitTransaction();\r\n            }\r\n            return RedirectToAction(nameof(Index));\r\n        }\r\n    }\r\n<\/pre>\n<h2 id=\"addcartforproducts\">\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a<\/h2>\n<h3>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u0438\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0435, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u0442\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0434\u043b\u044f \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0442\u0435\u043c\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u0430\u043d\u0441\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0435\u0430\u043d\u0441\u044b \u0432 \u0411\u0414, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043a\u043b\u0430\u0441\u0441 <strong>Program<\/strong>, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre class=\"lang:default decode:true \">builder.Services.AddSession(options =&gt;\r\n{\r\n    options.Cookie.Name = \"GameStore.Session\";\r\n    options.IdleTimeout = System.TimeSpan.FromHours(48);\r\n    options.Cookie.HttpOnly = false;\r\n});\r\n\r\nvar app = builder.Build();\r\n\r\napp.UseSession();\r\n<\/pre>\n<p>\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0441\u0435\u0430\u043d\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f string. \u0414\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044d\u0442\u0438\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 <strong>Infrastructure<\/strong> \u0444\u0430\u0439\u043b \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>SessionExtensions<\/strong><strong>.<\/strong><strong>cs<\/strong> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre class=\"lang:default decode:true \">public static class SessionExtensions\r\n    {\r\n        public static void SetJson(this ISession session, string key, object value)\r\n        {\r\n            session.SetString(key, JsonConvert.SerializeObject(value));\r\n        }\r\n        public static T GetJson&lt;T&gt;(this ISession session, string key)\r\n        {\r\n            var sessionData = session.GetString(key);\r\n            return sessionData == null ? default(T) : JsonConvert.DeserializeObject&lt;T&gt;(sessionData);\r\n        }\r\n    }\r\n<\/pre>\n<p>\u0412 \u043a\u043b\u0430\u0441\u0441\u0435 <strong>SessionExtensions<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 <strong>JSON<\/strong> \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u0438\u0445 \u0441\u043d\u043e\u0432\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0430\u043d\u0441\u0430.<\/p>\n<h2 id=\"cartmodel\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 Cart<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u043c \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 <strong>Mode<\/strong><strong>ls<\/strong> \u0444\u0430\u0439\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>Cart.cs<\/strong> \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u0435 \u0432 \u043d\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre class=\"lang:default decode:true \">public class Cart\r\n    {\r\n        private List&lt;OrderLine&gt; selections = new List&lt;OrderLine&gt;();\r\n\r\n        public IEnumerable&lt;OrderLine&gt; Selections { get =&gt; selections; }\r\n\r\n        public Cart AddItem(Product p, int quantity)\r\n        {\r\n            OrderLine orderLine = selections.Where(e =&gt; e.ProductId == p.Id).FirstOrDefault();\r\n            if (orderLine != null)\r\n            {\r\n                orderLine.Quantity += quantity;\r\n            }\r\n            else\r\n            {\r\n                selections.Add(new OrderLine\r\n                {\r\n                    ProductId = p.Id,\r\n                    Product = p,\r\n                    Quantity = quantity\r\n                });\r\n            }\r\n            return this;\r\n        }\r\n        public Cart RemoveItem(int productId)\r\n        {\r\n            selections.RemoveAll(e =&gt; e.ProductId == productId);\r\n            return this;\r\n        }\r\n        public void Clear() =&gt; selections.Clear();\r\n    }\r\n<\/pre>\n<p>\u041a\u043b\u0430\u0441\u0441 <strong>Cart<\/strong> \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 <strong>OrderLine<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430 \u0432 \u0411\u0414 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0437\u0430\u043a\u0430\u0437\u0430.<\/p>\n<h2 id=\"addcontroller\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 <strong>Cart<\/strong>, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 <strong>Controllers<\/strong> \u0444\u0430\u0439\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>CartController.cs<\/strong> \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre class=\"lang:default decode:true \">[ViewComponent(Name = \"Cart\")]\r\n    public class CartController : Controller\r\n    {\r\n        private readonly IProduct _products;\r\n        private readonly IOrder _order;\r\n\t\r\n        public CartController(IProduct products, IOrder order)\r\n        {\r\n            _products = products;\r\n            _order = order;\r\n        }\r\n        private Cart GetCart() =&gt; HttpContext.Session.GetJson&lt;Cart&gt;(\"Cart\") ?? new Cart();\r\n\r\n        private void SaveCart(Cart cart) =&gt; HttpContext.Session.SetJson(\"Cart\", cart);\r\n\r\n        public IActionResult Index(string returnUrl)\r\n        {\r\n            ViewBag.returnUrl = returnUrl;\r\n            return View(GetCart());\r\n        }\r\n        [HttpPost]\r\n        public IActionResult AddToCart(Product product, string returnUrl)\r\n        {\r\n            SaveCart(GetCart().AddItem(product, 1));\r\n            return RedirectToAction(nameof(Index), new { returnUrl });\r\n        }\r\n        [HttpPost]\r\n        public IActionResult RemoveFromCart(int productId, string returnUrl)\r\n        {\r\n            SaveCart(GetCart().RemoveItem(productId));\r\n            return RedirectToAction(nameof(Index), new { returnUrl });\r\n        }\r\n        public IActionResult Completed()\r\n        {\r\n            return View();\r\n        }\r\n        public IActionResult CreateOrder()\r\n        {\r\n            return View();\r\n        }\r\n        [HttpPost]\r\n        public IActionResult CreateOrder(Order order)\r\n        {\r\n            order.Lines = GetCart().Selections.Select(e =&gt; new OrderLine\r\n            {\r\n                ProductId = e.ProductId,\r\n                Quantity = e.Quantity\r\n            }).ToArray();\r\n            _order.AddOrder(order);\r\n            SaveCart(new Cart());\r\n            return RedirectToAction(nameof(Completed));\r\n        }\r\n        public IViewComponentResult Invoke(ISession session)\r\n        {\r\n            return new ViewViewComponentResult()\r\n            {\r\n                ViewData = new ViewDataDictionary&lt;Cart&gt;(ViewData, session.GetJson&lt;Cart&gt;(\"Cart\"))\r\n            };\r\n        }\r\n    }\r\n<\/pre>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u0438 \u0443\u0434\u0430\u043b\u044f\u044e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u043a\u043e\u0440\u0437\u0438\u043d\u044b, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437. \u0420\u044f\u0434 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>returnUrl<\/strong>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u0442\u043e\u0432\u0430\u0440\u043e\u0432, \u043d\u0435 \u0443\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0442\u0440\u043e\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u044e\u0442 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438. \u041a\u043b\u0430\u0441\u0441 <strong>CartController<\/strong> \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0434\u043a\u0438 \u043f\u043e \u043a\u043e\u0440\u0437\u0438\u043d\u0435 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<h2 id=\"createview\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043d\u0430\u0431\u0434\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u0437\u0438\u043d\u043e\u0439, \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 <strong>Views<\/strong> \/ <strong>Cart<\/strong> \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0435\u0435 \u0444\u0430\u0439\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>Index<\/strong><strong>.<\/strong><strong>cshtml<\/strong> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre class=\"lang:default decode:true \">@model Cart\r\n@{\r\n    Layout = \"~\/Views\/Store\/_Layout.cshtml\";\r\n}\t\r\n\r\n&lt;h2 class=\"m-3\"&gt;\u0412\u0430\u0448\u0430 \u043a\u043e\u0440\u0437\u0438\u043d\u0430&lt;\/h2&gt;\r\n&lt;div class=\"container-fluid\"&gt;\r\n    &lt;div class=\"row\"&gt;\r\n        &lt;div class=\"col font-weight-bold\"&gt;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e&lt;\/div&gt;\r\n        &lt;div class=\"col font-weight-bold\"&gt;\u0422\u043e\u0432\u0430\u0440&lt;\/div&gt;\r\n        &lt;div class=\"col font-weight-bold text-right\"&gt;\u0426\u0435\u043d\u0430&lt;\/div&gt;\r\n        &lt;div class=\"col font-weight-bold text-right\"&gt;\u041e\u0431\u0449\u0430\u044f \u0441\u0443\u043c\u043c\u0430&lt;\/div&gt;\r\n        &lt;div class=\"col\"&gt;&lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    @if (Model.Selections.Count() == 0)\r\n    {\r\n        &lt;div class=\"row mt-2\"&gt;\r\n            &lt;div class=\"col-12\"&gt;\r\n                &lt;h4&gt;\u041a\u043e\u0440\u0437\u0438\u043d\u0430 \u043f\u0443\u0441\u0442\u0430&lt;\/h4&gt;\r\n            &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n    }\r\n    else\r\n    {\r\n        @foreach (OrderLine line in Model.Selections)\r\n        {\r\n            &lt;div class=\"row mt-1\"&gt;\r\n                &lt;div class=\"col\"&gt;@line.Quantity&lt;\/div&gt;\r\n                &lt;div class=\"col\"&gt;@line.Product.Name&lt;\/div&gt;\r\n                &lt;div class=\"col text-right\"&gt;@line.Product.RetailPrice.ToString(\"f2\")&lt;\/div&gt;\r\n                &lt;div class=\"col text-right\"&gt;$@((line.Product.RetailPrice * line.Quantity).ToString(\"f2\"))&lt;\/div&gt;\r\n                &lt;div class=\"col\"&gt;\r\n                    &lt;form asp-action=\"RemoveFromCart\"&gt;\r\n                        &lt;button type=\"submit\" name=\"productId\" value=\"@line.ProductId\"\r\n                        class=\"btn btn-sm btn-outline-danger\"&gt;\r\n                            \u0423\u0434\u0430\u043b\u0438\u0442\u044c\r\n                        &lt;\/button&gt;\r\n                    &lt;\/form&gt;\r\n                &lt;\/div&gt;\r\n            &lt;\/div&gt;\r\n        }\r\n    }\r\n    &lt;div class=\"row mt-2\"&gt;\r\n        &lt;div class=\"col\"&gt;&lt;\/div&gt;\r\n        &lt;div class=\"col\"&gt;&lt;\/div&gt;\r\n        &lt;div class=\"col text-right font-weight-bold\"&gt;\u0412\u0441\u0435\u0433\u043e:&lt;\/div&gt;\r\n        &lt;div class=\"col text-right font-weight-bold\"&gt;\r\n            $@(Model.Selections.Sum(e=&gt;e.Product.RetailPrice * e.Quantity).ToString(\"f2\"))\r\n        &lt;\/div&gt;\r\n        &lt;div class=\"col\"&gt;&lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;div class=\"text-align-content-center m-2\"&gt;\r\n    @if (ViewBag.returnUrl != null)\r\n    {\r\n        &lt;a href=\"@ViewBag.returnUrl\" class=\"btn btn-outline-primary\"&gt;\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0438&lt;\/a&gt;\r\n    }\r\n    &lt;a asp-action=\"CreateOrder\" class=\"btn btn-primary\"&gt;\u041e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437&lt;\/a&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u0432\u043e\u0434\u043a\u0443 \u043f\u043e \u0442\u043e\u0432\u0430\u0440\u0430\u043c, \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u043c, \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043a\u043d\u043e\u043f\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438\u043b\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 <strong>Views<\/strong> \/ <strong>Cart<\/strong> \u0444\u0430\u0439\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>CreateOrder.cshtml<\/strong> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre class=\"lang:default decode:true \">@model Order\r\n@{\r\n    Layout = \"~\/Views\/Store\/_Layout.cshtml\";\r\n}\r\n&lt;h2 class=\"m-3\"&gt;\u041e\u0431\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f&lt;\/h2&gt;\r\n\r\n&lt;form asp-action=\"CreateOrder\" method=\"post\" class=\"m-4\"&gt;\r\n    &lt;div class=\"form-group\"&gt;\r\n        &lt;label&gt;\u0412\u0430\u0448\u0435 \u0438\u043c\u044f:&lt;\/label&gt;\r\n        &lt;input asp-for=\"CustomerName\" class=\"form-control\" \/&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"form-group\"&gt;\r\n        &lt;label&gt;\u0412\u0430\u0448\u0435 \u0430\u0434\u0440\u0435\u0441:&lt;\/label&gt;\r\n        &lt;input asp-for=\"Address\" class=\"form-control\" \/&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"form-group\"&gt;\r\n        &lt;label&gt;\u0412\u0430\u0448\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c:&lt;\/label&gt;\r\n        &lt;input asp-for=\"State\" class=\"form-control\" \/&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"form-group\"&gt;\r\n        &lt;label&gt;\u0412\u0430\u0448 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441:&lt;\/label&gt;\r\n        &lt;input asp-for=\"ZipCode\" class=\"form-control\" \/&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"text-center m-2\"&gt;\r\n        &lt;button type=\"submit\" class=\"btn btn-primary\"&gt;\u041e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437&lt;\/button&gt;\r\n        &lt;a asp-action=\"Index\" class=\"btn btn-secondary\"&gt;\u041e\u0442\u043c\u0435\u043d\u0430&lt;\/a&gt;\r\n    &lt;\/div&gt;\r\n&lt;\/form&gt;\r\n<\/pre>\n<p>\u0414\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u0430\u043a\u0430\u0437 \u0441\u043e\u0437\u0434\u0430\u043d, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 <strong>Views<\/strong> \/ <strong>Cart<\/strong> \u0444\u0430\u0439\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>Completed<\/strong><strong>.<\/strong><strong>cshtml<\/strong> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre class=\"lang:default decode:true \">@{\r\n    Layout = \"~\/Views\/Store\/_Layout.cshtml\";\r\n}\r\n&lt;div class=\"text-center m-4\"&gt;\r\n    &lt;h2&gt;\u0421\u043f\u0430\u0441\u0438\u0431\u043e!&lt;\/h2&gt;\r\n    &lt;p&gt;\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0437\u0430\u043a\u0430\u0437!&lt;\/p&gt;\r\n    &lt;p&gt;\u041c\u044b \u0441\u0432\u044f\u0436\u0438\u043c\u0441\u044f \u0441 \u0412\u0430\u043c\u0438 \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.&lt;\/p&gt;\r\n    &lt;a asp-action=\"Index\" asp-controller=\"Store\" class=\"btn btn-primary\"&gt;\u041e\u043a&lt;\/a&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f <strong>\u0432\u0438\u0434\u0436\u0435\u0442\u0430<\/strong> (\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430) \u0441\u043e \u0441\u0432\u043e\u0434\u043a\u043e\u0439 \u043f\u043e \u043a\u043e\u0440\u0437\u0438\u043d\u0435, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 <strong>Views<\/strong> \/ <strong>Shared<\/strong> \/ <strong>Components<\/strong> \/ <strong>Cart<\/strong> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0435 \u0444\u0430\u0439\u043b \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <strong>Default<\/strong><strong>.cshtml<\/strong> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre class=\"lang:default decode:true \">@model Cart\r\n\r\n@if (Model?.Selections?.Count() &gt; 0)\r\n{\r\n    &lt;div&gt;\r\n        @Model.Selections.Count() \u0442\u043e\u0432\u0430\u0440\u043e\u0432,\r\n        $@(Model.Selections.Sum(e=&gt;e.Quantity * e.Product.RetailPrice).ToString(\"f2\"))\r\n    &lt;\/div&gt;\r\n    if (ViewContext.RouteData.Values[\"controller\"] as string != \"Cart\")\r\n    {\r\n        &lt;a asp-action=\"Index\" asp-controller=\"Cart\" class=\"btn btn-sm btn-light\"&gt;\u0412 \u043a\u043e\u0440\u0437\u0438\u043d\u0443&lt;\/a&gt;\r\n    }\r\n}\r\n<\/pre>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <strong>Default<\/strong> \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0435 \u0438 \u0438\u0445 \u043e\u0431\u0449\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c. \u0422\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442 \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 <strong>Cart<\/strong>, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0432\u0438\u0434\u0436\u0435\u0442 \u043a\u043e\u0440\u0437\u0438\u043d\u044b, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <strong>Component.InvokeAsync()<\/strong> \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 <strong>Views<\/strong> \/ <strong>Store<\/strong> \/ <strong>_Layout.cshtml<\/strong>:<\/p>\n<pre class=\"lang:default decode:true \">&lt;div class=\"col-auto text-right\"&gt;\r\n                @await Component.InvokeAsync(\"Cart\", Context.Session)\r\n            &lt;\/div&gt;\r\n<\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0438\u0445 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-252 aligncenter\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/4-5.png\" alt=\"asp.et core products list\" width=\"1312\" height=\"782\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/4-5.png 1312w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/4-5-300x179.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/4-5-1024x610.png 1024w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/4-5-768x458.png 768w\" sizes=\"auto, (max-width: 1312px) 100vw, 1312px\" \/><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443, \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-253 aligncenter\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/5-2.png\" alt=\"asp.net core cart\" width=\"1312\" height=\"785\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/5-2.png 1312w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/5-2-300x179.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/5-2-1024x613.png 1024w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/5-2-768x460.png 768w\" sizes=\"auto, (max-width: 1312px) 100vw, 1312px\" \/><\/p>\n<p>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437, \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0444\u043e\u0440\u043c\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-254\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/6-2.png\" alt=\"asp.net core order details\" width=\"1311\" height=\"785\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/6-2.png 1311w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/6-2-300x180.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/6-2-1024x613.png 1024w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/6-2-768x460.png 768w\" sizes=\"auto, (max-width: 1311px) 100vw, 1311px\" \/><\/p>\n<p>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u201c\u041e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437\u201d.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-255\" src=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/7-2.png\" alt=\"asp.net core page message\" width=\"1134\" height=\"698\" srcset=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/7-2.png 1134w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/7-2-300x185.png 300w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/7-2-1024x630.png 1024w, https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/7-2-768x473.png 768w\" sizes=\"auto, (max-width: 1134px) 100vw, 1134px\" \/><\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0412 \u0433\u043b\u0430\u0432\u0435 \u0440\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c GameStore \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b\u0430\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439. \u0411\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u0432\u0430\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0442\u044c, \u0438\u0441\u043a\u0430\u0442\u044c \u0432 \u043d\u0435\u043c \u0442\u043e\u0432\u0430\u0440\u044b \u0438\u043b\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c. \u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0442\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0432 \u0411\u0414. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u0433\u043b\u0430\u0432\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u041cV\u0421 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0432\u0435\u0440\u0445 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430 Entity Framework \u0421\u0430\u0433\u0435, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0433\u043b\u0430\u0432\u0430\u0445. \u0422\u0430\u043a\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u0438 \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 &#8212; \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u043e\u0434\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u0441\u0442\u0430\u044e\u0442 \u043d\u0430 \u0441\u0432\u043e\u0438 \u043c\u0435\u0441\u0442\u0430. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0433\u043b\u0430\u0432\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f GameStore \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0432\u0435\u0431-\u0441\u043b\u0443\u0436\u0431\u044b REST.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u044f \u00ab\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF\u00bb, \u043f\u043e\u0434\u043e\u0448\u043b\u0430 \u043a \u043a\u043e\u043d\u0446\u0443, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u0430\u043c \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u2014\u00a0<a href=\"https:\/\/github.com\/murzilaka2\/GameStore-Part-4\">Github<\/a>.<\/p>\n<p>\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0432\u0430\u0448\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043a\u0430\u043a\u043e\u0439 \u0431\u044b\u043b \u0432\u0430\u0448 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435?<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f:<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"XcEDlzmM1o\"><p><a href=\"https:\/\/dijix.com.ua\/blog\/otpravka-email-v-asp-net-core\/\">\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 Email \u0432 Asp.Net Core<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u00ab\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 Email \u0432 Asp.Net Core\u00bb &#8212; Dijix -  \u0411\u043b\u043e\u0433\" src=\"https:\/\/dijix.com.ua\/blog\/otpravka-email-v-asp-net-core\/embed\/#?secret=D8gSWz000W#?secret=XcEDlzmM1o\" data-secret=\"XcEDlzmM1o\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<hr \/>\n<h4><strong>\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f C#?<\/strong><\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0438\u0437 \u0441\u0430\u0439\u0442\u043e\u0432, \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c-\u0431\u043e\u0442\u043e\u0432 \u0438 \u0442.\u0434.<\/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\u0438\u0442\u0435 \u043a \u043d\u0430\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <strong><a href=\"https:\/\/dijix.com.ua\/\">Dijix<\/a>\u00a0<\/strong>\u0438 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043c\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043d\u044f\u0442\u0438\u044f\u0445, \u043a\u0430\u043a \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c \u043a\u0430\u043a \u043e\u0434\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0433\u043e \u0412\u0430\u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u0442\u0430\u043a \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u043e\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043b\u0438\u0447\u043d\u043e\u043c\u0443 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0443, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0442\u0443\u0434\u0435\u043d\u0442 \u043f\u043e\u0432\u044b\u0441\u0438\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0432\u00a0\u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438:<\/p>\n<ul>\n<li>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0443<\/li>\n<li>\u0422\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438<\/li>\n<li>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043a\u043d\u0438\u0433<\/li>\n<li>\u041e\u043d\u043b\u0430\u0439\u043d \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/li>\n<li>\u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445<\/li>\n<\/ul>\n<blockquote>\n<p style=\"text-align: right;\"><a href=\"https:\/\/dijix.com.ua\/\">https:\/\/dijix.com.ua<\/a><\/p>\n<p style=\"text-align: right;\">\u0416\u0438\u0432\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u043c\u0438\u0440\u0435, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0439 \u0432 <a href=\"https:\/\/ms.dijix.com.ua\/\">\u043d\u0430\u0448\u0435\u043c<\/a>.<\/p>\n<\/blockquote>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core \u0438 Entity Framework Core. \u0412 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0443\u0437\u043d\u0430\u043b\u0438 \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 GameStore \u0434\u043b\u044f&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435<span class=\"screen-reader-text\">\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":258,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ru_RU","_original_post":"https:\/\/dijix.com.ua\/blog\/?p=248","footnotes":""},"categories":[8],"tags":[],"class_list":["post-248","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-net-core","ru-RU","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5 - Dijix - \u0411\u043b\u043e\u0433<\/title>\r\n<meta name=\"description\" content=\"\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core \u0438 Entity Framework Core. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f.\" \/>\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\/magazin-na-asp-net-core-mvc-ef-chast-5\/\" \/>\r\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5 - Dijix - \u0411\u043b\u043e\u0433\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/\" \/>\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=\"2022-09-27T10:40:46+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2023-02-02T15:53:38+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/1-8.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"858\" \/>\r\n\t<meta property=\"og:image:height\" content=\"572\" \/>\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 \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\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\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"20 \u043c\u0438\u043d\u0443\u0442\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/\"},\"author\":{\"name\":\"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/4ce2240cdf3db189e17ca0ff422a0c3d\"},\"headline\":\"\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5\",\"datePublished\":\"2022-09-27T10:40:46+00:00\",\"dateModified\":\"2023-02-02T15:53:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/\"},\"wordCount\":1645,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/#organization\"},\"articleSection\":[\"Asp.Net Core\"],\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/\",\"url\":\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/\",\"name\":\"\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5 - Dijix - \u0411\u043b\u043e\u0433\",\"isPartOf\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/#website\"},\"datePublished\":\"2022-09-27T10:40:46+00:00\",\"dateModified\":\"2023-02-02T15:53:38+00:00\",\"description\":\"\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core \u0438 Entity Framework Core. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f.\",\"breadcrumb\":{\"@id\":\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/#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\":\"\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5\"}]},{\"@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\":\"ru-RU\"},{\"@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\":\"ru-RU\",\"@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\":\"ru-RU\",\"@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":"\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5 - Dijix - \u0411\u043b\u043e\u0433","description":"\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core \u0438 Entity Framework Core. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f.","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\/magazin-na-asp-net-core-mvc-ef-chast-5\/","og_locale":"ru_RU","og_type":"article","og_title":"\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5 - Dijix - \u0411\u043b\u043e\u0433","og_url":"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/","og_site_name":"Dijix - \u0411\u043b\u043e\u0433","article_publisher":"https:\/\/www.facebook.com\/Dijixs","article_published_time":"2022-09-27T10:40:46+00:00","article_modified_time":"2023-02-02T15:53:38+00:00","og_image":[{"width":858,"height":572,"url":"https:\/\/dijix.com.ua\/blog\/wp-content\/uploads\/2022\/09\/1-8.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 \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"20 \u043c\u0438\u043d\u0443\u0442"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/#article","isPartOf":{"@id":"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/"},"author":{"name":"\u041b\u0435\u043e\u043d\u0438\u0434 \u041a\u0430\u0440\u0443\u043d\u0430","@id":"https:\/\/dijix.com.ua\/blog\/#\/schema\/person\/4ce2240cdf3db189e17ca0ff422a0c3d"},"headline":"\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5","datePublished":"2022-09-27T10:40:46+00:00","dateModified":"2023-02-02T15:53:38+00:00","mainEntityOfPage":{"@id":"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/"},"wordCount":1645,"commentCount":0,"publisher":{"@id":"https:\/\/dijix.com.ua\/blog\/#organization"},"articleSection":["Asp.Net Core"],"inLanguage":"ru-RU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/","url":"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/","name":"\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5 - Dijix - \u0411\u043b\u043e\u0433","isPartOf":{"@id":"https:\/\/dijix.com.ua\/blog\/#website"},"datePublished":"2022-09-27T10:40:46+00:00","dateModified":"2023-02-02T15:53:38+00:00","description":"\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core \u0438 Entity Framework Core. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f.","breadcrumb":{"@id":"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dijix.com.ua\/blog\/magazin-na-asp-net-core-mvc-ef-chast-5\/#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":"\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Asp.Net Core MVC EF. \u0427\u0430\u0441\u0442\u044c 5"}]},{"@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":"ru-RU"},{"@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":"ru-RU","@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":"ru-RU","@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\/248","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=248"}],"version-history":[{"count":2,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/posts\/248\/revisions"}],"predecessor-version":[{"id":338,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/posts\/248\/revisions\/338"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/media\/258"}],"wp:attachment":[{"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/media?parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/categories?post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dijix.com.ua\/blog\/wp-json\/wp\/v2\/tags?post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}