<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.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>Entity Framework: Undo Redo v2</title><link>http://msmvps.com/blogs/matthieu/archive/2009/06/10/entity-framework-undo-redo-v2.aspx</link><description>After my first Undo Redo POC version , one of my customers wanted to be able to manage many actions per Undo / Redo. So I added two extension methods: BeginGroupOfUndoActions and EndGroupOfUndoActions. My code is now this one: public static class ObjectContextExtension</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: Entity Framework: Undo Redo v2</title><link>http://msmvps.com/blogs/matthieu/archive/2009/06/10/entity-framework-undo-redo-v2.aspx#1739658</link><pubDate>Sat, 14 Nov 2009 04:41:50 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1739658</guid><dc:creator>wiktor256</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been trying to get it to work, and I am getting closer, but it&amp;#39;s not pretty. I have to resort to using reflection to access unexposed .NET methods and properties. I know, that&amp;#39;s bad, but I want to see if it is possible to make it work. The main reason for using the reflection is that there doesn&amp;#39;t seem to be a way to undelete an entity. After poking through .NET code, I found that ObjectStateEntry.RevertDelete() does the trick. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1739658" width="1" height="1"&gt;</description></item><item><title>re: Entity Framework: Undo Redo v2</title><link>http://msmvps.com/blogs/matthieu/archive/2009/06/10/entity-framework-undo-redo-v2.aspx#1739241</link><pubDate>Thu, 12 Nov 2009 13:43:47 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1739241</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;In RelatedEnd class, you have an AssociationChanged event so I think that you can use it to extend my code.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1739241" width="1" height="1"&gt;</description></item><item><title>re: Entity Framework: Undo Redo v2</title><link>http://msmvps.com/blogs/matthieu/archive/2009/06/10/entity-framework-undo-redo-v2.aspx#1739124</link><pubDate>Thu, 12 Nov 2009 01:39:20 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1739124</guid><dc:creator>wiktor256</dc:creator><description>&lt;p&gt;I see that this approach works for undo/redo of simple property changes. Am I missing something?&lt;/p&gt;
&lt;p&gt;Is there a way to also undo/redo changes in relationships between entities? For example, when a new Order is added to the Customer-&amp;gt;Orders collection?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1739124" width="1" height="1"&gt;</description></item><item><title>re: Entity Framework: Undo Redo v2</title><link>http://msmvps.com/blogs/matthieu/archive/2009/06/10/entity-framework-undo-redo-v2.aspx#1738405</link><pubDate>Sun, 08 Nov 2009 15:54:13 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1738405</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;It&amp;#39;s just a POC guys.&lt;/p&gt;
&lt;p&gt;So it&amp;#39;s possible that there is some bugs. Sorry for it but I am too busy to fix them.&lt;/p&gt;
&lt;p&gt;Matthieu&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1738405" width="1" height="1"&gt;</description></item><item><title>re: Entity Framework: Undo Redo v2</title><link>http://msmvps.com/blogs/matthieu/archive/2009/06/10/entity-framework-undo-redo-v2.aspx#1737807</link><pubDate>Thu, 05 Nov 2009 15:37:07 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1737807</guid><dc:creator>wiktor256</dc:creator><description>&lt;p&gt;Great code. I use it to undo all changes when the user clicks on a &amp;quot;Cancel&amp;quot; button.&lt;/p&gt;
&lt;p&gt;I think I stumbled on a small bug though. The undo list becomes empty after doing group undo. Then making a change to an entity causes an IndexOfOutOfBounds exception to be thrown in the line below.&lt;/p&gt;
&lt;p&gt;if (MultipleActions)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; _undo[0].Add(undoRedoAction);&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1737807" width="1" height="1"&gt;</description></item><item><title>re: Entity Framework: Undo Redo v2</title><link>http://msmvps.com/blogs/matthieu/archive/2009/06/10/entity-framework-undo-redo-v2.aspx#1735798</link><pubDate>Wed, 28 Oct 2009 10:04:21 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1735798</guid><dc:creator>Ivan</dc:creator><description>&lt;p&gt;This doesn&amp;#39;t work. I tested it in my application and doesn&amp;#39;t work.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1735798" width="1" height="1"&gt;</description></item><item><title>re: Entity Framework: Undo Redo v2</title><link>http://msmvps.com/blogs/matthieu/archive/2009/06/10/entity-framework-undo-redo-v2.aspx#1699126</link><pubDate>Fri, 10 Jul 2009 01:00:51 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1699126</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;nowhere. All the code is here.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1699126" width="1" height="1"&gt;</description></item><item><title>re: Entity Framework: Undo Redo v2</title><link>http://msmvps.com/blogs/matthieu/archive/2009/06/10/entity-framework-undo-redo-v2.aspx#1699023</link><pubDate>Thu, 09 Jul 2009 16:08:23 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1699023</guid><dc:creator>Vikas</dc:creator><description>&lt;p&gt;Fro where download this framework&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1699023" width="1" height="1"&gt;</description></item></channel></rss>