<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Using Stored Procedures for Change Processing in the ADO.NET Entity Framework</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx</link><description>Most people who’ve played with the ADO.NET Entity Framework eventually ask whether they can replace the SQL statements it generates with stored procedures of their own. This is important in many applications because direct table access is not allowed.</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Using Stored Procedures with ADO.Net Entity Framework</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#1842962</link><pubDate>Fri, 09 Mar 2007 12:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1842962</guid><dc:creator>Guy Burstein's Blog</dc:creator><description>&lt;p&gt;Last October, when I gave a talk about ADO.Net Entity Framework , one missing piece was to enable updating&lt;/p&gt;
</description></item><item><title>re: Using Stored Procedures for Change Processing in the ADO.NET Entity Framework</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#1860600</link><pubDate>Sun, 11 Mar 2007 23:47:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1860600</guid><dc:creator>Chris Moore</dc:creator><description>&lt;p&gt;Ok, this is a little off-topic for this post, but an important issue that is not addressed anywhere that I can find:&lt;/p&gt;
&lt;p&gt;The ADO Entity Framework seems to take us a certain part of the way, but not all the way, to what Fowler calls &amp;quot;Persistance Ignorance&amp;quot;. That is, ideally, one would like to be able to establish a domain layer that contained entities that are in no way aware of the underlying persistence mechanism being used. This would allow one to easily replacing the actual data access layer without being concerned about this affecting the domain layer. &lt;/p&gt;
&lt;p&gt;With the ADO.Net Entity Framewok I see two main violations of this principal that, as far as I can tell, cannot be circumvented:&lt;/p&gt;
&lt;p&gt;1. Entities must subclass the Entity framework class, and&lt;/p&gt;
&lt;p&gt;2. It is necessary to attach various attributes to entity properties.&lt;/p&gt;
&lt;p&gt;I can live with (1); with the appropriate discipline, one can avoid any dependency on the parent class from within the domain layer. If later I decide to use another persistence mechanism than ADO, I can easily remove Entity from the inheritance tree. &lt;/p&gt;
&lt;p&gt;Item (2), on the other hand, is much more troublesome and I can't see why attaching these attributes is strictly necessary. Notwithstanding the Data Contract attributes, all of the information encapsulated by these attached attributes is derived from information contained in the CSDL file - which is available at runtime via the metadata workspace. &lt;/p&gt;
&lt;p&gt;These considerations lead to the following questions:&lt;/p&gt;
&lt;p&gt;1. Why is it necessary to have CSDL redundant metadata; why can't the single source of this information just be the CSDL specification itself?&lt;/p&gt;
&lt;p&gt;2. Was the concept of &amp;quot;persistence ignorance&amp;quot; considered when the framwork was being designed? If so, why weren't the tenets of this principal followed more closely?&lt;/p&gt;
&lt;p&gt;3. Am I missing something? Is there some construct that would allow complete (or even allow one to come closer to) PI? Is there any way I could create a domain class that has no dependency at all on the entity framework and yet still have persistence services be managed by the framwork provided the CSDL, MSL and SSDL are specified?&lt;/p&gt;
&lt;p&gt;I think what you guys are doing here is really cool, interesting and useful; I just wish your approach allowed complete independence of one's domain layer from persistence infrastructure &lt;/p&gt;
</description></item><item><title>re: Using Stored Procedures for Change Processing in the ADO.NET Entity Framework</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#1922085</link><pubDate>Wed, 21 Mar 2007 02:39:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1922085</guid><dc:creator>Jacky Lee</dc:creator><description>&lt;p&gt;I just worry about the performance and security of dynamic SQL, which is widely adopted as the primary tool instead of stored procedure when referring to LINQ and other similar techs. So I insist that I still use LINQ to invoke stored procedures rather than to generate a dynamic SQL statement. I just hope that the LINQ team can make BETTER support for stored procedures.~~~~~&lt;/p&gt;
</description></item><item><title>re: Using Stored Procedures for Change Processing in the ADO.NET Entity Framework</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#1948495</link><pubDate>Mon, 26 Mar 2007 00:37:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1948495</guid><dc:creator>Tim McCarthy</dc:creator><description>&lt;p&gt;I made a simpler example with just one table called Customer. &amp;nbsp;Every time I try this I get the following error:&lt;/p&gt;
&lt;p&gt;System.Data.MappingException was unhandled&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Message=&amp;quot;A mapping function binding specifies an unknown function CustomerInsert. &amp;nbsp;File URI: file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio Codename Orcas/Projects/EntityFrameworkSamples/EntityDriver/bin/Debug/Model1.msl. Line Info: 12, 10.&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Source=&amp;quot;System.Data.Entity&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;StackTrace:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Mapping.StorageMappingItemLoader.FunctionMappingLoader.LoadAndValidateFunctionMetadata(XPathNavigator nav)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Mapping.StorageMappingItemLoader.FunctionMappingLoader.LoadEntityTypeFunctionMapping(XPathNavigator nav, Boolean allowCurrentVersion, Boolean allowOriginalVersion, EntityType entityType)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Mapping.StorageMappingItemLoader.LoadEntityTypeFunctionMapping(XPathNavigator nav, StorageEntitySetMapping entitySetMapping, StorageEntityTypeMapping entityTypeMapping)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Mapping.StorageMappingItemLoader.LoadEntityTypeMapping(XPathNavigator nav, StorageEntitySetMapping entitySetMapping, String tableName, EntityContainer storageEntityContainerType)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Mapping.StorageMappingItemLoader.LoadEntitySetMapping(XPathNavigator nav, StorageEntityContainerMapping entityContainerMapping, EntityContainer storageEntityContainerType)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Mapping.StorageMappingItemLoader.LoadEntityContainerMapping(XPathNavigator nav, StorageEntityContainerMapping entityContinerMapping, EntityContainer storageEntityContainerType)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Mapping.StorageMappingItemLoader.LoadMappingChildNodes(XPathNavigator nav, Boolean shouldDefaultUnspecifiedMaps)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Mapping.StorageMappingItemLoader.LoadMappingItems(XPathNavigator nav)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Mapping.StorageMappingItemLoader.LoadMappingItems()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Mapping.StorageMappingItemCollection.LoadItems(IEnumerable`1 filePaths)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Mapping.StorageMappingItemCollection..ctor(EdmItemCollection edmCollection, IEnumerable`1 filePaths)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.EntityClient.EntityConnection.CreateMetadataWorkspace(DbConnectionOptions connectionOptions, DbConnection connection)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.EntityClient.EntityConnection..ctor(String connectionString)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString, String defaultContainerName)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at EntityDriver.Program.ShowCustomers() in C:\Documents and Settings\Administrator\My Documents\Visual Studio Codename Orcas\Projects\EntityFrameworkSamples\EntityDriver\Program.cs:line 30&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at EntityDriver.Program.Main(String[] args) in C:\Documents and Settings\Administrator\My Documents\Visual Studio Codename Orcas\Projects\EntityFrameworkSamples\EntityDriver\Program.cs:line 20&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Threading.ThreadHelper.ThreadStart_Context(Object state)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Threading.ThreadHelper.ThreadStart()&lt;/p&gt;
&lt;p&gt;I have defined the CustomerInsert function properly in my .msl and .ssdl files, but it still will not work.&lt;/p&gt;
&lt;p&gt;Can you post your actual code files for this example?&lt;/p&gt;
</description></item><item><title>ADO.Net Entity Framework Stored Procedures</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#4035776</link><pubDate>Wed, 25 Jul 2007 02:22:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4035776</guid><dc:creator>Guy Burstein's Blog</dc:creator><description>&lt;p&gt;ADO.Net Entity Framework Stored Procedures Last October, when I gave a talk about ADO.Net Entity Framework&lt;/p&gt;
</description></item><item><title>Entity Framework - Object Services Level. CUD with Stored Procedures.</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#4619301</link><pubDate>Wed, 29 Aug 2007 01:33:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4619301</guid><dc:creator>Mike Taulty's Blog</dc:creator><description>&lt;p&gt;How would you get the Entity Framework to map inserts, updates, deletes through a stored procedure layer...&lt;/p&gt;
</description></item><item><title>re: Using Stored Procedures for Change Processing in the ADO.NET Entity Framework</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#5152294</link><pubDate>Wed, 26 Sep 2007 23:42:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5152294</guid><dc:creator>dat</dc:creator><description>&lt;p&gt;This approach is so complicated. I would never want to edit the xml. Why dont you have a tool to do that? I see LINQ To SQL have a desnger surface to drag and drop sp from Server Explorer. &lt;/p&gt;
</description></item><item><title>Entity Framework FAQ</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#6227885</link><pubDate>Thu, 15 Nov 2007 00:56:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6227885</guid><dc:creator>system.data.objects dev guy</dc:creator><description>&lt;p&gt;Entity Framework FAQ Version 0.2 – 11/14/2007 New in this version of the FAQ… &amp;#183; Table of contents with&lt;/p&gt;
</description></item><item><title>re: Using Stored Procedures for Change Processing in the ADO.NET Entity Framework</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#6477386</link><pubDate>Fri, 23 Nov 2007 07:09:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6477386</guid><dc:creator>ASN</dc:creator><description>&lt;p&gt;to Tim&lt;/p&gt;
&lt;p&gt;&amp;lt;cs:FunctionName=&amp;quot;dbo.CreateProduct&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;cs:FunctionName=&amp;quot;ProductInventory.Store.CreateProduct&amp;quot;&amp;gt;&lt;/p&gt;
</description></item><item><title>re: Using Stored Procedures for Change Processing in the ADO.NET Entity Framework</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#6477387</link><pubDate>Fri, 23 Nov 2007 07:09:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6477387</guid><dc:creator>ASN</dc:creator><description>&lt;p&gt;to Tim&lt;/p&gt;
&lt;p&gt;&amp;lt;cs:FunctionName=&amp;quot;dbo.CreateProduct&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;cs:FunctionName=&amp;quot;ProductInventory.Store.CreateProduct&amp;quot;&amp;gt;&lt;/p&gt;
</description></item><item><title>ADO.NET team blog : Using Stored Procedures for Change Processing in the ADO.NET Entity Framework</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#8567271</link><pubDate>Sun, 01 Jun 2008 05:49:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8567271</guid><dc:creator>Dating</dc:creator><description>&lt;p&gt;Most people who’ve played with the ADO.NET Entity Framework eventually ask whether they can replace the SQL statements it generates with stored procedures of their own. This is important in many applications because direct table access is not allowed&lt;/p&gt;
</description></item><item><title>ADO.NET team blog : Using Stored Procedures for Change Processing in the ADO.NET Entity Framework</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#8576870</link><pubDate>Fri, 06 Jun 2008 06:54:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8576870</guid><dc:creator>Weddings</dc:creator><description>&lt;p&gt;Most people who’ve played with the ADO.NET Entity Framework eventually ask whether they can replace the SQL statements it generates with stored procedures of their own. This is important in many applications because direct table access is not allowed&lt;/p&gt;
</description></item><item><title>Entity Framework FAQ(转)</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#8591588</link><pubDate>Wed, 11 Jun 2008 19:18:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8591588</guid><dc:creator>江南白衣</dc:creator><description>&lt;p&gt;The Entity Framework enables developers to reason about and write queries in terms of the EDM model rather than the logical schema of tables, joins, foreign keys, and so on. Many enterprise systems have multiple applications/databases with varying degrees&lt;/p&gt;
</description></item><item><title>Entity Services, Metadata &amp; Mapping</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#8846256</link><pubDate>Sun, 10 Aug 2008 11:27:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8846256</guid><dc:creator>system.data.objects dev guy</dc:creator><description>&lt;p&gt;Part of the Entity Framework FAQ . 13. EDM 13.1. Does Entity Framework support Abstract types in EDM&lt;/p&gt;
</description></item><item><title>re: Using Stored Procedures for Change Processing in the ADO.NET Entity Framework</title><link>http://blogs.msdn.com/adonet/archive/2007/03/08/using-stored-procedures-for-change-processing-in-the-ado-net-entity-framework.aspx#9152565</link><pubDate>Fri, 28 Nov 2008 21:00:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9152565</guid><dc:creator>Varun</dc:creator><description>&lt;p&gt;Has anyone done the mapping of an oracle stored procedure for insert and mapped the resultbinding columns to get the ID back for the insert, I am ending up with an error that this field is not avaliable in the datareader. If anyone has successfully done this please could you post the insert stored procedure.&lt;/p&gt;
&lt;p&gt;Thanks a lot in advance&lt;/p&gt;
</description></item></channel></rss>