{"id":1472,"date":"2014-04-10T14:11:44","date_gmt":"2014-04-10T13:11:44","guid":{"rendered":"http:\/\/soci.hu\/blog\/?p=1472"},"modified":"2014-04-10T14:31:45","modified_gmt":"2014-04-10T13:31:45","slug":"haklis-mvc-binder","status":"publish","type":"post","link":"https:\/\/soci.hu\/blog\/index.php\/2014\/04\/10\/haklis-mvc-binder\/","title":{"rendered":"H\u00e1klis MVC binder"},"content":{"rendered":"<p>Debugoztam egy j\u00f3\u00edz\u0171t az MVC forr\u00e1s\u00e1ban. A default binder nem akarta vissza\u00e1ll\u00edtani egy komplex model gyerek ojjektumait.<br \/>\nB\u0151sz debugol\u00e1s ut\u00e1n kider\u00fclt, hogy az zavarta meg, hogy a controller actionban a modellt fogad\u00f3 param\u00e9ter nev\u00e9t pont ugyanarra \u00e1ll\u00edtottam, mint a gy\u00f6k\u00e9r model objektum gyerek\u00e9t t\u00e1rol\u00f3 property nev\u00e9t. <\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n  public class RegistrationModel\r\n    {\r\n        public Registration R { get; set; }\r\n...\r\n\r\n &#x5B;HttpPost]\r\n        &#x5B;ValidateAntiForgeryToken]\r\n        public ActionResult Create(RegistrationModel r)\r\n        {\r\n<\/pre>\n<p>Az R property n\u00e9v a RegistrationModelben \u00e9s a RegistrationModel r param\u00e9ter az actionben, ez zavarta meg. \u00cdgy j\u00e1r, aki idi\u00f3ta neveket alkot. :)<\/p>\n<p>M\u00e9g van p\u00e1r hely a <a href=\"http:\/\/soci.hu\/tddcourse.aspx\">m\u00e1jusi TDD<\/a>-re.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debugoztam egy j\u00f3\u00edz\u0171t az MVC forr\u00e1s\u00e1ban. A default binder nem akarta vissza\u00e1ll\u00edtani egy komplex model gyerek ojjektumait. B\u0151sz debugol\u00e1s ut\u00e1n kider\u00fclt, hogy&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1472","post","type-post","status-publish","format-standard","hentry","category-szakmai-elet"],"_links":{"self":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1472"}],"version-history":[{"count":5,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1472\/revisions"}],"predecessor-version":[{"id":1479,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1472\/revisions\/1479"}],"wp:attachment":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}