{"id":735,"date":"2007-12-26T19:55:00","date_gmt":"2007-12-26T19:55:00","guid":{"rendered":"\/blogs\/bobb\/post\/Mapping-InsertUpdateDelete-sprocs-with-Entity-Designer.aspx"},"modified":"2013-01-07T09:00:24","modified_gmt":"2013-01-07T17:00:24","slug":"mapping-insertupdatedelete-sprocs-with-entity-designer","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/","title":{"rendered":"Mapping Insert\/Update\/Delete sprocs with Entity Designer"},"content":{"rendered":"<p>\nI&#39;ve been working with the new ADO.NET Entity Framework designer for a few weeks now, and I&#39;ve got to like it. If you&#39;re used to the LINQ To SQL Object Relational designer, in which all the action takes place in the &quot;diagram pane&quot;, it takes some getting used to. The ADO.NET Entity Framework designer actually uses three panes, the Entity Designer pane, the Model Browser pane (which docs itself in the Solution Explorer group at the right in my layout), and the Mapping Details pane (which docs itself in the Error List group at the bottom in my layout) pane.\n<\/p>\n<p>\nIn general, you can work with Entities (the CSDL) in the diagram pane or Model Browser. You can work with the store (database, the SSDL) in Model Browser, and the mapping (MSL) in Mapping Detalis. The Properties Window displays the property of the currently selected item, as with most things in Visual Studio.\n<\/p>\n<p>\nKnowing which pane to work in makes it easier to figure out how to perform operations like mapping INSERT\/UPDATE\/DELETE to stored procedures. In the download announcement (which lists the features by pane) one the the new features was &quot;View\/Edit mappings using stored procedures (insert\/update\/delete)&quot;. The Entity Model Tools document seemed to indicate &quot;not yet supported&quot;. I remember <a href=\"http:\/\/3.209.169.194\/blogs\/bobb\/using-stored-procedures-with-edm-objectservices-in-the-march-ctp-with-code\/\" class=\"broken_link\">doing this &quot;by hand&quot; in earlier betas<\/a> and it was fairly painful to hand-edit the XML file(s). I used the Model Browser to create a Function Import for my stored procedures and was ready to go&#8230;well&#8230;\n<\/p>\n<p>\nMapping the stored procedures to the insert\/update\/delete procedures in the Entity Designer (my LINQ to SQL experience got in the way here) and trying the Model Browser because the Mapping Details didn&#39;t seem to know about it, I finally located the little buttons on the extreme left side of the Mapping Details pane. The bottom button, &quot;Map Entity to Functions&quot; brought up an alternate Mapping Details pane, where I could map the stored procedures. Whew.\n<\/p>\n<p>\nMaybe I&#39;m &quot;GUI impaired&quot; but&nbsp;after I thought about it a while, where else would this function fit in the designer? Like I said, the EF\/EDM is rich enough to make the designer quite complex. But after adding an ordinary &quot;read&quot; stored procedure (ie, not for insert\/update\/delete) to the model, and <a href=\"http:\/\/social.msdn.microsoft.com\/forums\/en-US\/adodotnetentityframework\/thread\/187dbb38-6f2c-42f6-af1d-8d8514175872\/\">the XML hand-editing that this entails<\/a>, I&#39;m HAPPY to have to designer. Keep adding those new features&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#39;ve been working with the new ADO.NET Entity Framework designer for a few weeks now, and I&#39;ve got to like it. If you&#39;re used to the LINQ To SQL Object Relational designer, in which all the action takes place in the &quot;diagram pane&quot;, it takes some getting used to. The ADO.NET Entity Framework designer actually [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-735","post","type-post","status-publish","format-standard","hentry","category-data-access"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Mapping Insert\/Update\/Delete sprocs with Entity Designer - Bob Beauchemin<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mapping Insert\/Update\/Delete sprocs with Entity Designer - Bob Beauchemin\" \/>\n<meta property=\"og:description\" content=\"I&#039;ve been working with the new ADO.NET Entity Framework designer for a few weeks now, and I&#039;ve got to like it. If you&#039;re used to the LINQ To SQL Object Relational designer, in which all the action takes place in the &quot;diagram pane&quot;, it takes some getting used to. The ADO.NET Entity Framework designer actually [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/\" \/>\n<meta property=\"og:site_name\" content=\"Bob Beauchemin\" \/>\n<meta property=\"article:published_time\" content=\"2007-12-26T19:55:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-01-07T17:00:24+00:00\" \/>\n<meta name=\"author\" content=\"Bob Beauchemin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bob Beauchemin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/\",\"name\":\"Mapping Insert\/Update\/Delete sprocs with Entity Designer - Bob Beauchemin\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\"},\"datePublished\":\"2007-12-26T19:55:00+00:00\",\"dateModified\":\"2013-01-07T17:00:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Data Access\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/data-access\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Mapping Insert\/Update\/Delete sprocs with Entity Designer\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\",\"name\":\"Bob Beauchemin\",\"description\":\"SQL Server Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\",\"name\":\"Bob Beauchemin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"caption\":\"Bob Beauchemin\"},\"sameAs\":[\"http:\/www.sqlskills.com\/blogs\/bobb\/\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mapping Insert\/Update\/Delete sprocs with Entity Designer - Bob Beauchemin","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:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/","og_locale":"en_US","og_type":"article","og_title":"Mapping Insert\/Update\/Delete sprocs with Entity Designer - Bob Beauchemin","og_description":"I&#39;ve been working with the new ADO.NET Entity Framework designer for a few weeks now, and I&#39;ve got to like it. If you&#39;re used to the LINQ To SQL Object Relational designer, in which all the action takes place in the &quot;diagram pane&quot;, it takes some getting used to. The ADO.NET Entity Framework designer actually [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/","og_site_name":"Bob Beauchemin","article_published_time":"2007-12-26T19:55:00+00:00","article_modified_time":"2013-01-07T17:00:24+00:00","author":"Bob Beauchemin","twitter_misc":{"Written by":"Bob Beauchemin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/","name":"Mapping Insert\/Update\/Delete sprocs with Entity Designer - Bob Beauchemin","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website"},"datePublished":"2007-12-26T19:55:00+00:00","dateModified":"2013-01-07T17:00:24+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/mapping-insertupdatedelete-sprocs-with-entity-designer\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/"},{"@type":"ListItem","position":2,"name":"Data Access","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/data-access\/"},{"@type":"ListItem","position":3,"name":"Mapping Insert\/Update\/Delete sprocs with Entity Designer"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/","name":"Bob Beauchemin","description":"SQL Server Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e","name":"Bob Beauchemin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","caption":"Bob Beauchemin"},"sameAs":["http:\/www.sqlskills.com\/blogs\/bobb\/"],"url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/comments?post=735"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/735\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/media?parent=735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/categories?post=735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/tags?post=735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}