{"id":176097,"date":"2013-04-09T22:54:08","date_gmt":"2013-04-09T18:54:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=176097"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=176097","title":{"rendered":"<span class=\"post_title\">ASP.NET MVC \u0423\u0440\u043e\u043a D. Scaffolding<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<b>\u0426\u0435\u043b\u044c \u0443\u0440\u043e\u043a\u0430.<\/b> \u041d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Scaffolding \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u044f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430. \u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Scaffolder-\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u00ab\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435\u00bb \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f Scaffolder-\u0430. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432. \u041f\u043e\u043b\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435.<\/p>\n<h5>Scaffolding. \u041d\u0430\u0447\u0430\u043b\u043e.<\/h5>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0443\u0440\u043e\u043a\u0435 \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043c \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0432 \u0440\u0430\u0437\u044b \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0430\u0447\u043d\u0435\u043c \u0438\u0437\u0434\u0430\u043b\u0435\u043a\u0430. \u041a\u043e\u0433\u0434\u0430 \u044f \u0434\u0435\u043b\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0430\u0439\u0442, \u044f \u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0435\u0433\u043e \u0443 \u0441\u0435\u0431\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u041f\u043e\u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u044f \u043d\u0430\u0447\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c. \u042f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0443\u0440\u043e\u043a\u0430\u0445. \u042f \u043d\u0430\u0447\u0430\u043b \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u044f \u0434\u0435\u043b\u0430\u044e \u0447\u0430\u0441\u0442\u043e \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<ul>\n<li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u0411\u0414 \u043d\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/li>\n<li>\u043f\u0440\u043e\u043a\u0438\u043d\u0443\u0442\u044c \u0435\u0435 \u0432 \u043a\u043b\u0430\u0441\u0441 DbContext<\/li>\n<li>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u044f<\/li>\n<li>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432 SqlRepository<\/li>\n<li>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c partial-\u0447\u0430\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0430 \u0432 \u043f\u0430\u043f\u043a\u0435 Proxy<\/li>\n<li>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>\u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c mapping <\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435<\/li>\n<li>\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0435 view \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0418 \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0438\u0441\u0442\u0438\u043d\u0443 \u0441\u043a\u0443\u0447\u043d\u043e, \u044f \u0447\u0430\u0441\u0442\u043e \u043e\u0448\u0438\u0431\u0430\u043b\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0448\u0430\u0433\u043e\u0432 \u2013 \u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u0418 \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0441\u043d\u0438\u043f\u043f\u0435\u0442\u044b, \u043d\u043e \u043e\u043d\u0438 \u0440\u0435\u0448\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0437\u0430\u0434\u0430\u0447\u0438, \u0430 \u0432\u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, index.cshtml, edit.cshtml \u2013 \u044d\u0442\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e.<\/p>\n<p>  \u0418 \u0432\u043e\u0442 \u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e \u0421\u0442\u0438\u0432\u0435\u043d\u0430 \u0421\u0430\u043d\u0434\u0435\u0440\u0441\u043e\u043d\u0430 \u00ab<a href=\"http:\/\/blog.stevensanderson.com\/2011\/01\/13\/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package\/\">Scaffold your ASP.NET MVC 3 project with the MvcScaffolding package<\/a>\u00bb \u0438 \u0437\u0430\u0433\u043e\u0440\u0435\u043b\u0441\u044f. \u0421\u043a\u0430\u0444\u0444\u043e\u043b\u0434\u0438\u043d\u0433 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b \u043c\u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u043e\u043d \u043d\u0435 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0418 \u044f \u043d\u0430\u0447\u0430\u043b \u0438\u0437\u0443\u0447\u0430\u0442\u044c. \u0412 \u043e\u0441\u043d\u043e\u0432\u0435 \u0435\u0433\u043e \u0441\u0442\u043e\u044f\u043b T4 (<a href=\"http:\/\/www.olegsych.com\/2007\/12\/text-template-transformation-toolkit\/\">Text Template Transformation Toolkit<\/a>), \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u043e\u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"http:\/\/en.wikipedia.org\/wiki\/Windows_PowerShell\">Windows PowerShell<\/a>. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441 PowerShell \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0432 PackageManager Console (\u0443\u0445, \u043a\u0430\u043a \u0437\u0430\u043a\u0440\u0443\u0447\u0435\u043d\u043e!). \u042f \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0433\u0440\u0443\u0436\u0443\u0441\u044c \u0432 Windows PowerShell \u0438 T4, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u0441\u043a\u0430\u0444\u0444\u043e\u043b\u0434\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u043d\u0430\u043c \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0442\u0430\u043a \u044d\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c PowerGUI \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 PowerShell. \u0412 VS2010 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f PowerShell. \u041d\u043e \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 VS2012 \u0438 \u043d\u0430\u043c \u043f\u043e\u043a\u0430 \u0442\u0430\u043a \u043d\u0435 \u043f\u043e\u0432\u0435\u0437\u043b\u043e. <\/p>\n<p>  \u041e\u043a, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0434\u043b\u044f t4 &#8212;<a href=\"http:\/\/t4-editor.tangible-engineering.com\"> http:\/\/t4-editor.tangible-engineering.com<\/a>. \u0422\u043e\u0436\u0435 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0434\u043b\u044f VS2012. \u041d\u0443 \u0447\u0442\u043e \u0436 \u2013 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043e\u0447\u043a\u0430 \u0435\u0441\u0442\u044c \u0438 \u043b\u0430\u0434\u043d\u043e. <br \/>  \u2003  <\/p>\n<h5>T4<\/h5>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0438\u0437\u0443\u0447\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 T4. \u042f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439:<a href=\"http:\/\/www.olegsych.com\/2007\/12\/text-template-transformation-toolkit\/\"> http:\/\/www.olegsych.com\/2007\/12\/text-template-transformation-toolkit\/<\/a><\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 LesssonProject.T4. \u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0443\u0434\u0430 HelloWorld.tt:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/c6f\/6bb\/d57\/c6f6bbd57e05cbeb4c2147d6214ed6d8.jpg\"\/><\/p>\n<p>  \u0418\u0437\u043c\u0435\u043d\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e:  <\/p>\n<pre><code class=\"cs\">&lt;#@ template debug=&quot;true&quot; hostSpecific=&quot;true&quot; #&gt; &lt;#@ output extension=&quot;.cs&quot; #&gt; &lt;#@ Assembly Name=&quot;System.Core&quot; #&gt; &lt;#@ Assembly Name=&quot;System.Windows.Forms&quot; #&gt; &lt;#@ import namespace=&quot;System&quot; #&gt; &lt;#@ import namespace=&quot;System.IO&quot; #&gt; &lt;#@ import namespace=&quot;System.Diagnostics&quot; #&gt; &lt;#@ import namespace=&quot;System.Linq&quot; #&gt; &lt;#@ import namespace=&quot;System.Collections&quot; #&gt; &lt;#@ import namespace=&quot;System.Collections.Generic&quot; #&gt;  &lt;#    var greeting = &quot;Hello, World!&quot;; #&gt;  \/\/ This is the output code from your template \/\/ you only get syntax-highlighting here - not intellisense namespace MyNameSpace  { \tclass MyGeneratedClass  \t{ \t\tstatic void main (string[] args)  \t\t{ \t\t\tSystem.Console.WriteLine(&quot;&lt;#= greeting #&gt;&quot;); \t\t} \t} }   &lt;#+   \/\/ Insert any template procedures here   void foo(){} #&gt;  <\/code><\/pre>\n<p>  \u041e\u043a, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442:<\/p>\n<pre><code class=\"cs\">\/\/ This is the output code from your template \/\/ you only get syntax-highlighting here - not intellisense namespace MyNameSpace  { \tclass MyGeneratedClass  \t{ \t\tstatic void main (string[] args)  \t\t{ \t\t\tSystem.Console.WriteLine(&quot;Hello, World!&quot;); \t\t} \t} } <\/code><\/pre>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 .tt \u0444\u0430\u0439\u043b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0439 \u043e\u0442 TextTransformation. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">&lt;#@ template  language=&quot;C#&quot; #&gt; Hello World! <\/code><\/pre>\n<p>  \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432:  <\/p>\n<pre><code class=\"cs\">public class GeneratedTextTransform : Microsoft.VisualStudio.TextTemplating.TextTransformation     {         public override string TransformText()         {             this.Write(&quot;Hello, World!&quot;);             return this.GenerationEnvironment.ToString();         }     } <\/code><\/pre>\n<p>  \u0410 \u0438\u0442\u043e\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0444\u0430\u0439\u043b .cs:  <\/p>\n<pre><code>Hello World! <\/code><\/pre>\n<p>  \u0418\u0437\u0443\u0447\u0438\u043c \u0431\u043b\u043e\u043a\u0438 \u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 aspx, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u043a\u043e\u0431\u043e\u043a &lt;% %&gt; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f &lt;# #&gt;. \u041d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a aspx \u043c\u044b \u043d\u0435 \u0438\u0437\u0443\u0447\u0430\u043b\u0438, \u0442\u043e:  <\/p>\n<ul>\n<li>\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0431\u043b\u043e\u043a \u2013 \u044d\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 (\u0438\u0437\u0432\u0438\u043d\u0438\u0442\u0435 \u0437\u0430 \u0442\u0430\u0444\u0442\u043e\u043b\u043e\u0433\u0438\u044e):<br \/> \n<pre><code>&lt;#@ template language=&quot;C#&quot; #&gt; Hello World! <\/code><\/pre>\n<p>  <\/li>\n<li>\u0411\u043b\u043e\u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u2013 \u044d\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u0431\u043b\u043e\u043a, \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 &lt;# #&gt;. \u0412\u0441\u0451 \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e, \u044d\u0442\u043e \u044f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0434\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0443 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430:<br \/> \n<pre><code>&lt;#    var greeting = &quot;Hello, World!&quot;; #&gt; <\/code><\/pre>\n<p>  <\/li>\n<li>\u0411\u043b\u043e\u043a \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u2013 \u044d\u0442\u043e \u0431\u043b\u043e\u043a, \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 &lt;#= #&gt;. \u0412\u0441\u0451, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043e \u043a \u0441\u0442\u0440\u043e\u043a\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0442\u0435\u043a\u0441\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u0430:<br \/> \n<pre><code>System.Console.WriteLine(&quot;&lt;#= greeting #&gt;&quot;); <\/code><\/pre>\n<p>  <\/li>\n<li>\u0411\u043b\u043e\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u2013 \u044d\u0442\u043e \u0431\u043b\u043e\u043a, \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u0432<code> &lt;#+ #&gt;<\/code>. \u0412\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u043c \u0431\u043b\u043e\u043a\u0435, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0441\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/li>\n<li>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430<code> &lt;#@ template #&gt;<\/code> \u2013 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0430:<br \/> \n<ul>\n<li><code>&lt;#@ template language=\u201dC#\u201d&gt;<\/code> \u2013 \u0437\u0430\u0434\u0430\u0435\u0442 \u044f\u0437\u044b\u043a \u043a\u043b\u0430\u0441\u0441\u0430.<\/li>\n<li><code>&lt;#@ template debug=\u201dtrue\u201d&gt; <\/code> \u2013 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/li>\n<li><code>&lt;#@ template inherits=\u201dMyTextTransformation\u201d&gt;<\/code> \u2013 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u0430.<\/li>\n<\/ul>\n<\/li>\n<li>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430<code> &lt;#@ output #&gt;<\/code> \u2013 \u0437\u0430\u0434\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430:<br \/> \n<pre><code>&lt;#@ output extension=&quot;.cs&quot; #&gt; <\/code><\/pre>\n<p>  <\/li>\n<li>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>&lt;#@ import #&gt;<\/code> \u2013 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 namespace. \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0447\u0442\u043e \u0438 using \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c (\u043d\u043e \u043d\u0435 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0430 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430):<br \/> \n<pre><code>&lt;#@ import namespace=&quot;System.Collections&quot; #&gt; <\/code><\/pre>\n<p>  <\/li>\n<li>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>&lt;#@ assembly #&gt;<\/code> \u2013 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0431\u043e\u0440\u043a\u0438. \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0432 VisualStudio \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Reference:<br \/> \n<pre><code>&lt;#@ Assembly Name=&quot;System.Core&quot; #&gt; <\/code><\/pre>\n<\/li>\n<li>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>&lt;#@ include #&gt;<\/code> \u2013 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u043a\u0438\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 \u043c\u0435\u0441\u0442\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043a\u0430\u043a <a href=\"http:\/\/habrahabr.ru\/users\/html\/\" class=\"user_link\">Html<\/a>.Partial():<br \/> \n<pre><code>&lt;#@ include file=&quot;Included.tt&quot; #&gt; <\/code><\/pre>\n<\/li>\n<li>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430<code> &lt;#@ parameter #&gt;<\/code> \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430. \u041d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443. <a href=\"http:\/\/www.olegsych.com\/2010\/05\/t4-parameter-directive\/\">\u0421\u0441\u044b\u043b\u043a\u0430<\/a><\/li>\n<li>\u041f\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u2013 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u043e <a href=\"http:\/\/www.olegsych.com\/2007\/12\/text-template-transformation-toolkit\/\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/li>\n<\/ul>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0438 \u0437\u043d\u0430\u043d\u0438\u0439 \u043f\u043e Reflection \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442, \u0447\u0442\u043e\u0431\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0444\u0430\u0439\u043b\u044b, \u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443 MvcScaffolding.<\/p>\n<h5>MVCScaffolding<\/h5>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c T4Scaffolding:  <\/p>\n<pre><code>PM&gt; Install-Package T4Scaffolding <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 CodeTemplates\/Scaffolders\/IRepository \u0432 LessonProject.Model \u0432 \u043d\u0435\u0439 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b\u044b IRepository.ps1 (LessonProject.Model\/CodeTemplates\/Scaffolders\/IRepository\/IRepository.ps1):  <\/p>\n<pre><code>[T4Scaffolding.Scaffolder(Description = &quot;Create IRepository interface&quot;)][CmdletBinding()] param(     \t[parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)][string]$ModelType,         [string]$Project, \t[string]$CodeLanguage, \t[string[]]$TemplateFolders, \t[switch]$Force = $false )  $foundModelType = Get-ProjectType $ModelType -Project $Project -BlockUi if (!$foundModelType) { return }  # Find the IRepository interface, or create it via a template if not already present $foundIRepositoryType = Get-ProjectType IRepository -Project $Project -AllowMultiple if(!$foundIRepositoryType)  { \t#Create IRepository \t$outputPath = &quot;IRepository&quot; \t$defaultNamespace = (Get-Project $Project).Properties.Item(&quot;DefaultNamespace&quot;).Value \t Add-ProjectItemViaTemplate $outputPath -Template IRepositoryTemplate ` \t-Model @{ Namespace = $defaultNamespace } ` \t-SuccessMessage &quot;Added IRepository at {0}&quot; ` \t-TemplateFolders $TemplateFolders -Project $Project -CodeLanguage $CodeLanguage -Force:$Force \t \t$foundIRepositoryType = Get-ProjectType IRepository -Project $Project }  # Add a new property on the DbContext class if ($foundIRepositoryType) { \t$propertyName = $foundModelType.Name \t$propertyNames = Get-PluralizedWord $propertyName \t# This *is* a DbContext, so we can freely add a new property if there isn't already one for this model \tAdd-ClassMemberViaTemplate -Name $propertyName -CodeClass $foundIRepositoryType -Template IRepositoryItemTemplate -Model @{ \t\tEntityType = $foundModelType; \t\tEntityTypeNamePluralized = $propertyNames; \t} -SuccessMessage &quot;Added '$propertyName' to interface '$($foundIRepositoryType.FullName)'&quot; -TemplateFolders $TemplateFolders -Project $Project -CodeLanguage $CodeLanguage }  return @{ \tDbContextType = $foundDbContextType } <\/code><\/pre>\n<p>  \u041f\u043e\u0442\u043e\u043c IRepositoryItemTemplate.cs.t4:  <\/p>\n<pre><code>&lt;#@ Template Language=&quot;C#&quot; HostSpecific=&quot;True&quot; Inherits=&quot;DynamicTransform&quot; #&gt; #region &lt;#= ((EnvDTE.CodeType)Model.EntityType).Name #&gt;  IQueryable&lt;&lt;#= ((EnvDTE.CodeType)Model.EntityType).Name #&gt;&gt; &lt;#= Model.EntityTypeNamePluralized #&gt; { get; }  bool Create&lt;#= ((EnvDTE.CodeType)Model.EntityType).Name #&gt;(&lt;#= ((EnvDTE.CodeType)Model.EntityType).Name #&gt; instance);  bool Update&lt;#= ((EnvDTE.CodeType)Model.EntityType).Name #&gt;(&lt;#= ((EnvDTE.CodeType)Model.EntityType).Name  #&gt; instance);  bool Remove&lt;#=((EnvDTE.CodeType)Model.EntityType).Name #&gt;(int id&lt;#= ((EnvDTE.CodeType)Model.EntityType).Name  #&gt;);  #endregion \u0418 IRepositoryTemplate.cs.t4: &lt;#@ Template Language=&quot;C#&quot; HostSpecific=&quot;True&quot; Inherits=&quot;DynamicTransform&quot; #&gt; &lt;#@ Output Extension=&quot;cs&quot; #&gt; using System; using System.Collections.Generic; using System.Linq; using System.Web;  namespace &lt;#= Model.Namespace #&gt; {     public interface IRepository     {         IQueryable&lt;T&gt; GetTable&lt;T&gt;() where T : class;     } } \u2003  <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 Notify:  <\/p>\n<table>\n<tr>\n<td><b>Name<\/b><\/td>\n<td><b>DataType<\/b><\/td>\n<\/tr>\n<\/table>\n<p>  UserIDint (foreignKey to User)<br \/>  Messagenvarchar(140)<br \/>  AddedDatedatetime<br \/>  IsReadedbit<\/p>\n<p>  \u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c \u0432 DbContext (LessonProjectDb.dbml) \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c (ctrl-S):<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/15d\/31a\/1c7\/15d31a1c7e867c0d2953922e4ed17ba6.jpg\"\/><\/p>\n<p>  \u0412 Package Manager Console \u043f\u0438\u0448\u0435\u043c \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 LessonProject.Model:  <\/p>\n<pre><code class=\"bash\">PM&gt; Scaffold IRepository Notify Added 'Notify' to interface 'LessonProject.Model.IRepository' <\/code><\/pre>\n<p>  \u0423\u0440\u0430! \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442! \u041f\u0440\u043e\u0441\u0442\u043e, \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438? \u041d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u044f\u0441\u043d\u043e? \u041e\u043a, \u043b\u0430\u0434\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c IRepository.ps1 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443:  <\/p>\n<pre><code>[T4Scaffolding.Scaffolder(Description = &quot;Create IRepository interface&quot;)][CmdletBinding()] param(     \t[parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)][string]$ModelType,         [string]$Project, \t[string]$CodeLanguage, \t[string[]]$TemplateFolders, \t[switch]$Force = $false ) <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0441\u043a\u0430\u0444\u0444\u043e\u043b\u0434\u0435\u0440\u0430. \u041e\u0441\u043e\u0431\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430 <code>$ModelType<\/code> \u2013 \u044d\u0442\u043e \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430, \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u043c\u044b \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <code>Scaffold IRepository Notify<\/code>. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0434\u0443\u0442 \u0438\u043b\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u0430\u043a Force, \u0438\u043b\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b, \u043a\u0430\u043a Project, CodeLanguage.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0438\u0449\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 (\u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c\u0441\u044f, \u0442\u043e \u0438\u0441\u043a\u043e\u043c\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0435\u0449\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d):  <\/p>\n<pre><code class=\"bash\">$foundModelType = Get-ProjectType $ModelType -Project $Project -BlockUi if (!$foundModelType) { return } <\/code><\/pre>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u043d\u0430\u0439\u0434\u0435\u043d \u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438. \u041d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b IRepository.cs \u0438 \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u0442, \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c:  <\/p>\n<pre><code class=\"bash\"># Find the IRepository interface, or create it via a template if not already present $foundIRepositoryType = Get-ProjectType IRepository -Project $Project -AllowMultiple if(!$foundIRepositoryType)  { \t#Create IRepository \t$outputPath = &quot;IRepository&quot; \t$defaultNamespace = (Get-Project $Project).Properties.Item(&quot;DefaultNamespace&quot;).Value \t Add-ProjectItemViaTemplate $outputPath -Template IRepositoryTemplate ` \t-Model @{ Namespace = $defaultNamespace } ` \t-SuccessMessage &quot;Added IRepository at {0}&quot; ` \t-TemplateFolders $TemplateFolders -Project $Project -CodeLanguage $CodeLanguage -Force:$Force \t \t$foundIRepositoryType = Get-ProjectType IRepository -Project $Project } <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043a\u0430\u043a \u0440\u0430\u0437 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f IRepositoryTemplate.cs.t4 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0438 \u0442\u0443\u0434\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0432 View) \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442   <\/p>\n<pre><code>-Model @{ Namespace = $defaultNamespace } ` <\/code><\/pre>\n<p>  \u0410 defaultNamespace \u0431\u044b\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u0438\u0437 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430   <\/p>\n<pre><code class=\"bash\">Get-Project $Project).Properties.Item(&quot;DefaultNamespace&quot;).Value <\/code><\/pre>\n<p>  \u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043c\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c (CodeTemplates\/Scaffolders\/IRepository\/IRepositoryTemplate.cs.t4):  <\/p>\n<pre><code class=\"cs\">namespace &lt;#= Model.Namespace #&gt; <\/code><\/pre>\n<p>  \u041e\u043a, \u0444\u0430\u0439\u043b \u0441\u043e\u0437\u0434\u0430\u043d (\u0438\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d) \u0438 \u0438\u0434\u0435\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0433\u0443. \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u0433\u0435\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c (<code>$foundIRepositoryType<\/code>), \u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443 <code>IRepositoryItemTemplate<\/code> \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\"># Add a new property on the DbContext class if ($foundIRepositoryType) { \t$propertyName = $foundModelType.Name \t$propertyNames = Get-PluralizedWord $propertyName \t# This *is* a DbContext, so we can freely add a new property if there isn't already one for this model \tAdd-ClassMemberViaTemplate -Name $propertyName -CodeClass $foundIRepositoryType -Template IRepositoryItemTemplate -Model @{ \t\tEntityType = $foundModelType; \t\tEntityTypeNamePluralized = $propertyNames; \t} -SuccessMessage &quot;Added '$propertyName' to interface '$($foundIRepositoryType.FullName)'&quot; -TemplateFolders $TemplateFolders -Project $Project -CodeLanguage $CodeLanguage } <\/code><\/pre>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:  <\/p>\n<pre><code class=\"bash\">-Model @{ \t\tEntityType = $foundModelType; \t\tEntityTypeNamePluralized = $propertyNames; \t} <\/code><\/pre>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 <code>Get-PluralizedWord<\/code> \u0438 \u043a\u0430\u043a\u0443\u044e \u0440\u043e\u043b\u044c \u043e\u043d\u043e \u0441\u044b\u0433\u0440\u0430\u043b\u043e \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435:  <\/p>\n<pre><code class=\"cs\">  IQueryable&lt;Notify&gt; Notifies { get; } <\/code><\/pre>\n<p>  \u0422.\u0435. \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u2018s\u2019, \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0432 \u0441\u043d\u0438\u043f\u043f\u0435\u0442\u0435.<br \/>  \u0418\u0437\u0443\u0447\u0438\u043c \u0435\u0449\u0435 \u044d\u0442\u0438 T4Scaffolding cmdlet:  <\/p>\n<ul>\n<li><b>Add-ClassMember<\/b> \u2013 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0443\u0441\u043e\u0447\u0435\u043a \u043a\u043e\u0434\u0430 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0441:<br \/> \n<pre><code class=\"bash\">$class = Get-ProjectType HomeController  Add-ClassMember $class &quot;public string MyNewStringField;&quot; <\/code><\/pre>\n<p>  <\/li>\n<li><b>Add-ClassMemberViaTemplate<\/b> \u2013 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 \u0448\u0430\u0431\u043b\u043e\u043d T4:<br \/> \n<pre><code class=\"bash\">$class = Get-ProjectType HomeController  Add-ClassMemberViaTemplate -CodeClass $class -Template &quot;YourTemplateName&quot; -Model @{ SomeParam = &quot;SomeValue&quot;; AnotherParam = $false } -TemplateFolders $TemplateFolders <\/code><\/pre>\n<p>  <\/li>\n<li><b>Add-ProjectItemViaTemplate<\/b> \u2013 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b (project item) \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0430:<br \/> \n<pre><code class=\"bash\">Add-ProjectItemViaTemplate -OutputPath &quot;Some\\Folder\\MyFile&quot; -Template &quot;YourTemplateName&quot; -Model @{ SomeParam = &quot;SomeValue&quot;; AnotherParam = $false } -TemplateFolders $TemplateFolders <\/code><\/pre>\n<p>  <\/li>\n<li><b>Get-PluralizedWord \/ Get-SingularizedWord<\/b> \u2013 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435\/\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441\u043b\u043e\u0432\u0430:<br \/> \n<pre><code class=\"bash\">$result = Get-PluralizedWord Person    # Sets $result to &quot;People&quot;  $result = Get-SingularizedWord People    # Sets $result to &quot;Person&quot; <\/code><\/pre>\n<p>  <\/li>\n<li><b>Get-PrimaryKey<\/b> \u2013 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445:<br \/> \n<pre><code class=\"bash\">$pk = Get-PrimaryKey StockItem <\/code><\/pre>\n<p>  <\/li>\n<li><b>Get-ProjectFolder<\/b> \u2013 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 <br \/> \n<pre><code class=\"bash\">$folder = Get-ProjectFolder &quot;Views\\Shared&quot;  Write-Host &quot;The shared views folder contains $($folder.Count) items&quot; <\/code><\/pre>\n<p>  <\/li>\n<li><b>Get-ProjectItem<\/b> \u2013 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b <br \/> \n<pre><code class=\"bash\">$file = Get-ProjectItem &quot;Controllers\\HomeController.cs&quot;  $file.Open()  $file.Activate()  <\/code><\/pre>\n<p>  <\/li>\n<li><b>Get-ProjectLanguage<\/b> \u2013 \u0434\u043b\u044f C# \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u2013 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 cs, \u0434\u043b\u044f VB \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 VB<br \/> \n<pre><code class=\"bash\">$defaultProjectLanguage = Get-ProjectLanguage  $otherProjectLanguage = Get-ProjectLanguage -Project SomeOtherProjectName <\/code><\/pre>\n<p>  <\/li>\n<li><b>Get-ProjectType<\/b> \u2013 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043b\u0430\u0441\u0441\u0430 (EnvDTE.CodeType)<br \/> \n<pre><code class=\"bash\">$class = Get-ProjectType HomeController  Add-ClassMember $class &quot;public string MyNewStringField;&quot; <\/code><\/pre>\n<p>  <\/li>\n<li><b>Get-RelatedEntities<\/b> \u2013 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043e\u0434\u0438\u043d-\u043a\u043e-\u043c\u043d\u043e\u0433\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a\u043b\u0430\u0441\u0441\u0430<br \/> \n<pre><code class=\"bash\">Get-RelatedEntities Product <\/code><\/pre>\n<p>  <\/li>\n<li><b>Set-IsCheckedOut <\/b>\u2013 \u044d\u0442\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 source-control. \u0422.\u0435. \u0435\u0441\u043b\u0438 \u043d\u0430\u0434\u043e checkOut \u0444\u0430\u0439\u043b \u043a\u0430\u043a\u043e\u0439-\u0442\u043e, \u0442\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439. <br \/> \n<pre><code class=\"bash\">Set-IsCheckedOut &quot;Controllers\\HomeController.cs&quot; <\/code><\/pre>\n<p>  <\/li>\n<\/ul>\n<p>  \u041d\u0443 \u0447\u0442\u043e? \u0427\u0443\u0432\u0441\u0442\u0432\u0443\u0435\u0442\u0435 \u043c\u043e\u0449\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0436\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u043d\u0433 \u0432 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445? \u041d\u043e(!) \u0423\u0447\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u0441\u0435 \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u044b\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0442\u043e\u0436\u0435 \u043b\u044e\u0434\u044c\u043c\u0438. \u0418, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f ID, \u0430 \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f PervichniyKlyuch \u2013 \u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u044d\u0442\u043e \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0422\u0430\u043a\u0436\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b. \u042d\u0442\u043e \u0441\u043a\u0430\u0444\u0444\u043e\u043b\u0434\u0438\u043d\u0433, \u0442.\u0435. \u0447\u0435\u0440\u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0430 \u043d\u0435 \u0442\u043e\u043d\u0447\u0430\u0439\u0448\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430. \u0421\u0443\u0442\u044c \u0441\u043a\u0430\u0444\u0444\u043e\u043b\u0434\u0438\u043d\u0433\u0430 \u2013 \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043f\u043e\u0439\u0442\u0438 \u043f\u0438\u0442\u044c \u0447\u0430\u0439, \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430 \u0432\u0430\u0441 \u0441\u0430\u043c\u0443\u044e \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0443\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0440\u0443\u0442\u0438\u043d\u0443.<\/p>\n<h5>\u0421\u043d\u043e\u0432\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u044b, EnvDTE.CodeType<\/h5>\n<p>  \u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c \u0438 \u0438\u0437\u0443\u0447\u0438\u043c \u0442\u043e, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 EnvDTE.CodeType.<br \/>  CodeType \u2013 \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043a\u043b\u0430\u0441\u0441\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0447\u0435\u0440\u0435\u0437 Get-ProjectType.<br \/>  \u0427\u0442\u043e \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043f\u0440\u043e \u044d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430:  <\/p>\n<ul>\n<li><b>Access <\/b>\u2013 \u043a\u0430\u043a\u043e\u0439 \u044d\u0442\u043e \u0442\u0438\u043f, \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439, \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0438 \u0442.\u0434..<\/li>\n<li><b>Attributes <\/b>\u2013 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u044d\u0442\u0438\u043c \u0442\u0438\u043f\u043e\u043c.<\/li>\n<li><b>Bases <\/b>\u2013 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044d\u0442\u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.<\/li>\n<li><b>Children <\/b>\u2013 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445\u0441\u044f \u0432 \u044d\u0442\u043e\u043c CodeType.<\/li>\n<li><b>Comment <\/b>\u2013 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0439\u0441\u044f \u043a \u043a\u043b\u0430\u0441\u0441\u0443. (\u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e). <\/li>\n<li><b>DerivedTypes<\/b> \u2013 \u041d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0435 \u0442\u0438\u043f\u044b. \u042d\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 Visual C#.<\/li>\n<li><b>DocComment <\/b>\u2013 \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0438\u043b\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u0443 \u0440\u043e\u043b\u044c.<\/li>\n<li><b>DTE <\/b>\u2013 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f<\/li>\n<li><b>EndPoint <\/b>\u2013 \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/li>\n<li><b>FullName <\/b>\u2013 \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f, \u0442\u0438\u043f\u0430 System.Int32 <\/li>\n<li><b>InfoLocation <\/b>\u2013 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/li>\n<li><b>IsCodeType <\/b>\u2013 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 CodeType \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/li>\n<li><b>IsDerivedFrom <\/b>\u2013 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 CodeType \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442.<\/li>\n<li><b>Kind <\/b>\u2013 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0438\u043f\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/li>\n<li><b>Language <\/b>\u2013 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u044d\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e.<\/li>\n<li><b>Members <\/b>\u2013 \u0447\u043b\u0435\u043d\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0412\u043e\u0442 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f <b>\u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/b>.<\/li>\n<li><b>Name <\/b>\u2013 \u0438\u043c\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430. <\/li>\n<li><b>Namespace <\/b>\u2013 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/li>\n<li><b>Parent <\/b>\u2013 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/li>\n<li><b>ProjectItem <\/b>\u2013 \u0444\u0430\u0439\u043b \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/li>\n<li><b>StartPoint <\/b>\u2013 \u0441\u0442\u0440\u043e\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/li>\n<\/ul>\n<p>  \u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u043e \u043c\u044b \u0438\u0445 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c. <br \/>  \u041a\u0441\u0442\u0430\u0442\u0438, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 EnvDTEExtensions.cs \u0432 T4Scaffolding (\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u0441\u044e\u0434\u0430: <a href=\"http:\/\/mvcscaffolding.codeplex.com\/SourceControl\/changeset\/view\/7cd57d172314\">http:\/\/mvcscaffolding.codeplex.com\/SourceControl\/changeset\/view\/7cd57d172314<\/a>), \u043a\u0430\u043a\u0438\u0435 \u0435\u0449\u0435 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b. <br \/>  \u0424\u0443\u0445! \u041d\u0443 \u0447\u0442\u043e, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u0441\u0451 \u043f\u043e \u043f\u043e\u043b\u043e\u0447\u043a\u0430\u043c, \u0440\u0430\u0441\u043a\u0440\u043e\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u0434, \u0430 \u043f\u043e\u0442\u043e\u043c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443, \u043a\u0430\u043a \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0438 \u0438\u0434\u0442\u0438 \u0433\u043e\u043d\u044f\u0442\u044c \u0447\u0430\u0438.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442: LessonProject.Scaffolding, \u0438 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0442\u0443 \u043f\u0430\u0440\u0443 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438\u0437 \u043f\u0435\u0440\u0432\u044b\u0445 \u0443\u0440\u043e\u043a\u043e\u0432, \u0441 \u043c\u0435\u0447\u043e\u043c \u0438 \u0432\u043e\u0438\u043d\u043e\u043c.<br \/>  IWeapon.cs:  <\/p>\n<pre><code class=\"cs\">public interface IWeapon     {         void Kill();     }  <\/code><\/pre>\n<p>  Bazuka.cs:  <\/p>\n<pre><code class=\"cs\">public class Bazuka : IWeapon     {          public void Kill()         {             Console.WriteLine(&quot;BIG BADABUM!&quot;);         }     } <\/code><\/pre>\n<p>  Sword.cs:  <\/p>\n<pre><code class=\"cs\">public class Sword : IWeapon     {         public void Kill()         {             Console.WriteLine(&quot;Chuk-chuck&quot;);         }     } <\/code><\/pre>\n<p>  Warrior.cs:  <\/p>\n<pre><code class=\"cs\">\/\/\/ &lt;summary&gt; \/\/\/ This is LEGENDARY WARRIOR! \/\/\/ &lt;\/summary&gt; public class Warrior     {         readonly IWeapon Weapon;          public Warrior(IWeapon weapon)         {             this.Weapon = weapon;         }                  public void Kill()         {             Weapon.Kill();         }     }  <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c T4Scaffolding:  <\/p>\n<pre><code class=\"bash\">Install-Package T4Scaffolding <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 PowerShell (\/CodeTemplates\/Scaffolders\/Details\/Details.ps1):  <\/p>\n<pre><code class=\"bash\">[T4Scaffolding.Scaffolder(Description = &quot;Print Details for class&quot;)][CmdletBinding()] param(     \t[parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)][string]$ModelType,         [string]$Project, \t[string]$CodeLanguage, \t[string[]]$TemplateFolders, \t[switch]$Force = $false ) $foundModelType = Get-ProjectType $ModelType -Project $Project -BlockUi if (!$foundModelType) { return }  $outputPath = Join-Path &quot;Details&quot; $ModelType  Add-ProjectItemViaTemplate $outputPath -Template Details ` \t\t-Model @{  ModelType = $foundModelType  } ` \t\t-SuccessMessage &quot;Yippee-ki-yay&quot;` \t\t-TemplateFolders $TemplateFolders -Project $Project -CodeLanguage $CodeLanguage -Force:$Force <\/code><\/pre>\n<p>  \u0417\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432 Details.t4 (\/CodeTemplates\/Scaffolders\/Details\/Details.cs.t4):  <\/p>\n<pre><code class=\"bash\">&lt;#@ template language=&quot;C#&quot;  HostSpecific=&quot;True&quot; Inherits=&quot;DynamicTransform&quot; debug=&quot;true&quot; #&gt; &lt;#@ assembly name=&quot;System.Data.Entity&quot; #&gt; &lt;#@ import namespace=&quot;System.Linq&quot; #&gt; &lt;#@ import namespace=&quot;EnvDTE&quot; #&gt; &lt;#@ Output Extension=&quot;txt&quot; #&gt; &lt;#      var modelType = (EnvDTE.CodeType)Model.ModelType;  #&gt;  FullName : &lt;#= modelType.FullName #&gt; Name : &lt;#= modelType.Kind #&gt; &lt;#= modelType.Name #&gt; Access : &lt;#= modelType.Access #&gt; Attributes :  &lt;# foreach(var codeElement in modelType.Attributes) {  \tvar attr = (EnvDTE.CodeAttribute)codeElement; #&gt;     &lt;#= attr.Name #&gt; &lt;# } #&gt;  Bases :  &lt;# foreach(var codeElement in modelType.Bases) {  \tvar @base = (EnvDTE.CodeType)codeElement; #&gt;     &lt;#= @base.Name #&gt; &lt;# } #&gt;  Comment :  &lt;#= modelType.Comment #&gt; DocComment :  &lt;#= modelType.DocComment #&gt;  StartPoint : Line: &lt;#= ((EnvDTE.TextPoint)modelType.StartPoint).Line #&gt; EndPoint :  Line : &lt;#= ((EnvDTE.TextPoint)modelType.EndPoint).Line #&gt;  Members : &lt;# foreach(var codeElement in modelType.Members) {  \tvar member = (EnvDTE.CodeElement)codeElement; #&gt;     &lt;#= member.Kind #&gt; &lt;#= member.Name #&gt; &lt;# } #&gt; <\/code><\/pre>\n<p>  \u0412\u044b\u0432\u0435\u0434\u0435\u043c \u0434\u043b\u044f Warrior.cs  <\/p>\n<pre><code class=\"bash\">PM&gt; Scaffold Details Warrior -Force:$true Yippee-ki-yay <\/code><\/pre>\n<ul>\n<li>\u0418\u043c\u044f\\ \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f<\/li>\n<li>\u0422\u0438\u043f \u043c\u043e\u0434\u0435\u043b\u0438<\/li>\n<li>\u0414\u043e\u0441\u0442\u0443\u043f <\/li>\n<li>\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438<\/li>\n<li>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441<\/li>\n<li>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439<\/li>\n<li>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/li>\n<li>\u0421\u0442\u0440\u043e\u043a\u0430 \u0444\u0430\u0439\u043b\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435, \u0438 \u0441\u0442\u0440\u043e\u043a\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 <\/li>\n<li>\u0418\u043c\u0435\u043d\u0430 \u0447\u043b\u0435\u043d\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441 \u0442\u0438\u043f\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0430<\/li>\n<\/ul>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u0442.\u0435. \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0443\u0442\u0438\u043d\u043d\u044b \u0434\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e, \u0432\u0435\u0434\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a, \u0442\u0430\u043a \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u043e\u0440\u0430 \u043c\u044b \u0443\u0431\u0438\u0440\u0430\u0435\u043c.<\/p>\n<h5>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043a\u0430\u0444\u0444\u043e\u043b\u0434\u0435\u0440\u043e\u0432<\/h5>\n<p>  \u0418\u0442\u0430\u043a, \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0442\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u0434 \u0432\u0441\u0435\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043c\u043d\u043e\u044e \u0441\u043a\u0430\u0444\u0444\u043e\u043b\u0434\u0435\u0440\u043e\u0432, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0438\u0448\u0443 \u0437\u0434\u0435\u0441\u044c \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e ManageAttribute. \u042d\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0435\u043c \u043f\u043e\u043b\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432 \u0434\u0430\u043b\u044c\u0448\u0435\u0439\u0448\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u0430\u0440\u043a\u0435\u0440\u044b \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0442\u0440\u0438\u0431\u0443\u0442 LangColumn \u2013 \u044d\u0442\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u00ab\u044f\u0437\u044b\u043a\u043e\u0432\u044b\u043c\u00bb. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c ModelView \u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0438\u0445 \u0442\u043e\u0436\u0435.   <\/p>\n<ul>\n<li>IRepository (Model). \u041c\u044b \u0443\u0436\u0435 \u0441 \u043d\u0438\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u044b, \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 IRepository \u0438 \u0432\u043d\u043e\u0441\u0438\u0442 CRUD-\u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430:<br \/> \n<pre><code class=\"bash\">Scaffold IRepository ModelName <\/code><\/pre>\n<p>  <\/li>\n<li>Proxy (Model). \u0421\u043e\u0437\u0434\u0430\u0435\u0442 Proxy partial class. \u0415\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 Lang:$true, \u0442\u043e \u0441\u043a\u0430\u0444\u0444\u043e\u043b\u0434\u0435\u0440 \u0438\u0449\u0435\u0442 \u044f\u0437\u044b\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 ModelName+\u201dLang\u201d \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044f \u0432 partial class.<br \/> \n<pre><code class=\"bash\">Scaffold Proxy ModelName -Lang:$true <\/code><\/pre>\n<p>  <\/li>\n<li>SqlRepository (Model). \u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e CRUD-\u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430 ModelName. \u0422\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 Lang \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u0441 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438<br \/> \n<pre><code class=\"bash\">Scaffold SqlRepository ModelName -Lang:$true <\/code><\/pre>\n<p>  <\/li>\n<li>ProviderRepository (Model). \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0440\u0438 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043a\u0430\u0444\u0444\u043e\u043b\u0434\u0438\u043d\u0433\u0430 \u0437\u0430 \u043e\u0434\u0438\u043d \u0440\u0430\u0437<br \/> \n<pre><code class=\"bash\">Scaffold ProviderRepository ModelName -Lang:$true <\/code><\/pre>\n<p>  <\/li>\n<li>Model (Web). \u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c ModelNameView \u0432 Models\/ViewModels \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Automapper \u0432 Mappers\/MappersCollection.cs. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u043e View-\u043a\u043b\u0430\u0441\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438 Index\/Edit view:<br \/> \n<ul>\n<li>ShowIndex \u2013 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 Index<\/li>\n<li>PrimaryField \u2013 \u043f\u043e\u043b\u0435 ID<\/li>\n<li>CheckBox \u2013 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0432\u043e\u0434\u0430 CheckBox<\/li>\n<li>DropDownField \u2013 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0432\u043e\u0434\u0430 DropDownField<\/li>\n<li>HiddenField \u2013 \u0441\u043a\u0440\u044b\u0442\u043e\u0435 \u043f\u043e\u043b\u0435<\/li>\n<li>HtmlTextField \u2013 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0432\u043e\u0434\u0430 textarea, \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\u043e\u043c htmltext<\/li>\n<li>RadioField \u2013 \u043f\u043e\u043b\u0435 c \u0440\u0430\u0434\u0438\u043e-\u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 (\u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c)<\/li>\n<li>TextAreaField \u2013 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0432\u043e\u0434\u0430 textarea<\/li>\n<li>TextBoxField \u2013 \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"bash\">Scaffold Model ModelName <\/code><\/pre>\n<p>  <\/li>\n<li>SelectReference (Web). \u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u043e view-\u043a\u043b\u0430\u0441\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0434\u0438\u043d-\u043a\u043e-\u043c\u043d\u043e\u0433\u0438\u043c, \u0442.\u0435. \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u044b\u0431\u043e\u0440\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0433\u043e\u0440\u043e\u0434 (City) \u0441 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043a \u0448\u0442\u0430\u0442\u0443 (State), \u0442\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0433\u043e\u0440\u043e\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0448\u0442\u0430\u0442\u043e\u0432, \u0437\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 StateID. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SelectReference, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043a\u043e\u0434 \u043a CityView: <br \/> \n<pre><code class=\"bash\">Scaffold SelectReference City State <\/code><\/pre>\n<p>  <\/li>\n<li>Controller (Web). \u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e ModelName \u0442\u0438\u043f\u0430. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0438 Index\\Edit View. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<br \/> \n<ul>\n<li>Area (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2013 \u043d\u0435\u0442), \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c Area<\/li>\n<li>Paging (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2013 false), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434<\/li>\n<li>Lang (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2013 false), \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"bash\">Scaffold Controller ModelName \u2013Area:Admin \u2013Paging:$true \u2013Lang:$true <\/code><\/pre>\n<p>  <\/li>\n<li>IndexView\\EditView (Web). \u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043b\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u2014 \u0442\u0435 \u0436\u0435, \u0447\u0442\u043e \u0438 \u0443 Controller:<br \/> \n<ul>\n<li>Area (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2013 \u043d\u0435\u0442), \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c Area<\/li>\n<li>Paging (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2013 false), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434<\/li>\n<li>Lang (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2013 false), \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"bash\">Scaffold IndexView ModelName \u2013Area:Admin \u2013Paging:$true \u2013Lang:$true Scaffold EditView ModelName \u2013Area:Admin \u2013Paging:$true \u2013Lang:$true <\/code><\/pre>\n<p>  <\/li>\n<\/ul>\n<h5>\u0418\u0442\u043e\u0433<\/h5>\n<p>  \u0421\u043a\u0430\u0444\u0444\u043e\u043b\u0434\u0438\u043d\u0433 \u2013 \u044d\u0442\u043e \u043d\u0435 \u043f\u0430\u043d\u0430\u0446\u0435\u044f, \u043d\u043e \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043a\u043e\u0434. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0443\u0442\u0438\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. <br \/>  \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (\u043e\u0431\u044a\u0435\u043a\u0442\u0430) \u0431\u0443\u0434\u0443\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:  <\/p>\n<ul>\n<li>\u041e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443(\u044b) \u0441 \u043f\u043e\u043b\u044f\u043c\u0438 \u0432 \u0411\u0414<\/li>\n<li>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0435\u0435 \u0432 DBContext.dbml<\/li>\n<li>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c ProviderRepository \u0434\u043b\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0443\u0431\u0440\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b<\/li>\n<li>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Model \u0434\u043b\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446<\/li>\n<li>\u041f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0432\u043e view-\u043a\u043b\u0430\u0441\u0441\u0430\u0445, \u0443\u0431\u0440\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0435 \u043f\u043e\u043b\u044f<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435<\/li>\n<li>\u0414\u043e\u043f\u0438\u043b\u0438\u0442\u044c \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u043e\u043b\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432)<\/li>\n<\/ul>\n<p>  \u0412\u0441\u0451 \u044d\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u0431\u043b\u0438\u0446, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0441\u0442\u0430\u0440\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0430\u0442\u0447. \u0423 \u043c\u0435\u043d\u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u043e 20-30 \u0442\u0430\u0431\u043b\u0438\u0446, \u044d\u0442\u043e \u0437\u0430\u043d\u044f\u043b\u043e \u043e\u043a\u043e\u043b\u043e 5 \u043c\u0438\u043d\u0443\u0442, \u043d\u043e \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u0440\u043e\u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f \u0446\u0435\u043b\u044b\u0439 \u0434\u0435\u043d\u044c.<br \/>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u043a\u0430\u0444\u0444\u043e\u043b\u0434\u0438\u043d\u0433\u043e\u0432, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0435\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<p>  \u0412\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"https:\/\/bitbucket.org\/chernikov\/lessons\">https:\/\/bitbucket.org\/chernikov\/lessons<\/a>    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/176097\/\"> http:\/\/habrahabr.ru\/post\/176097\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<b>\u0426\u0435\u043b\u044c \u0443\u0440\u043e\u043a\u0430.<\/b> \u041d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Scaffolding \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u044f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430. \u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Scaffolder-\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u00ab\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435\u00bb \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f Scaffolder-\u0430. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432. \u041f\u043e\u043b\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435.<\/p>\n<h5>Scaffolding. \u041d\u0430\u0447\u0430\u043b\u043e.<\/h5>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0443\u0440\u043e\u043a\u0435 \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043c \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0432 \u0440\u0430\u0437\u044b \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0430\u0447\u043d\u0435\u043c \u0438\u0437\u0434\u0430\u043b\u0435\u043a\u0430. \u041a\u043e\u0433\u0434\u0430 \u044f \u0434\u0435\u043b\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0430\u0439\u0442, \u044f \u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0435\u0433\u043e \u0443 \u0441\u0435\u0431\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u041f\u043e\u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u044f \u043d\u0430\u0447\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c. \u042f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0443\u0440\u043e\u043a\u0430\u0445. \u042f \u043d\u0430\u0447\u0430\u043b \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u044f \u0434\u0435\u043b\u0430\u044e \u0447\u0430\u0441\u0442\u043e \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<ul>\n<li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u0411\u0414 \u043d\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/li>\n<li>\u043f\u0440\u043e\u043a\u0438\u043d\u0443\u0442\u044c \u0435\u0435 \u0432 \u043a\u043b\u0430\u0441\u0441 DbContext<\/li>\n<li>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u044f<\/li>\n<li>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432 SqlRepository<\/li>\n<li>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c partial-\u0447\u0430\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0430 \u0432 \u043f\u0430\u043f\u043a\u0435 Proxy<\/li>\n<li>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>\u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c mapping <\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435<\/li>\n<li>\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0435 view \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<\/ul>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-176097","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/176097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=176097"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/176097\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=176097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=176097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=176097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}