<?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>Matthieu MEZIL - All Comments</title><link>http://msmvps.com/blogs/matthieu/default.aspx</link><description>I love .Net</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Un pattern şi trei implementări (partea 2)</title><link>http://msmvps.com/blogs/matthieu/archive/2008/06/06/entity-framework-include-with-func-next.aspx#1739867</link><pubDate>Sun, 15 Nov 2009 14:27:50 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1739867</guid><dc:creator>Tudor Turcu - blog</dc:creator><description>&lt;p&gt;După *** spuneam &amp;icirc;n postul precedent , fiecare O/RM are propria metodă de a descrie graful de obiecte&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1739867" 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#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>Working with Large Databases in Entity Framework</title><link>http://msmvps.com/blogs/matthieu/archive/2009/05/27/how-to-split-your-edm.aspx#1739503</link><pubDate>Fri, 13 Nov 2009 12:32:54 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1739503</guid><dc:creator>Gil Fink on .Net</dc:creator><description>&lt;p&gt;Working with Large Databases in Entity Framework Yesterday I was asked by a colleague a very good EF&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1739503" 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 Include with Func next</title><link>http://msmvps.com/blogs/matthieu/archive/2008/06/06/entity-framework-include-with-func-next.aspx#1738397</link><pubDate>Sun, 08 Nov 2009 15:08:40 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1738397</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;Try with DirectCast instead of TryCast. It was stupid in my case to use the as operator instead a direct cast.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1738397" width="1" height="1"&gt;</description></item><item><title>re: How to use LINQ extension methods on non generic IEnumerable?</title><link>http://msmvps.com/blogs/matthieu/archive/2009/04/01/how-to-use-linq-extension-methods-on-non-generic-ienumerable.aspx#1738395</link><pubDate>Sun, 08 Nov 2009 15:02:22 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1738395</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;I did it for a colleague who works with Sharepoint and who were very happy with this.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1738395" width="1" height="1"&gt;</description></item><item><title>re: Bug with IQueryable and yield syntax: System.BadImageFormatException "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"</title><link>http://msmvps.com/blogs/matthieu/archive/2008/10/14/bug-with-iqueryable-and-yield-syntax-system-badimageformatexception-quot-an-attempt-was-made-to-load-a-program-with-an-incorrect-format-exception-from-hresult-0x8007000b-quot.aspx#1738394</link><pubDate>Sun, 08 Nov 2009 14:46:10 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1738394</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;This bug is now fixed (with VS 2010 Beta)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1738394" width="1" height="1"&gt;</description></item><item><title>re: EDM can save your hair :-)</title><link>http://msmvps.com/blogs/matthieu/archive/2009/01/29/edm-can-save-your-hair.aspx#1738393</link><pubDate>Sun, 08 Nov 2009 14:42:29 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1738393</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;In the SSDL, you have an attribute StoreGeneratedPattern per column. Set it to Identity.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1738393" width="1" height="1"&gt;</description></item><item><title>re: POO is so pretty with C#</title><link>http://msmvps.com/blogs/matthieu/archive/2009/05/18/poo-is-so-pretty.aspx#1738392</link><pubDate>Sun, 08 Nov 2009 14:28:37 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1738392</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;I don&amp;#39;t know what happens. I updated the link. It should be good now.&lt;/p&gt;
&lt;p&gt;Sorry for the delay but I changed of my laptop and I didn&amp;#39;t keep this project.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1738392" 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: How to use LINQ extension methods on non generic IEnumerable?</title><link>http://msmvps.com/blogs/matthieu/archive/2009/04/01/how-to-use-linq-extension-methods-on-non-generic-ienumerable.aspx#1736682</link><pubDate>Sun, 01 Nov 2009 01:10:43 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1736682</guid><dc:creator>Smartass</dc:creator><description>&lt;p&gt;You just put in a ton of effort to get rid of 4 characters per invocation. &amp;nbsp;Usually lazy is good, but that doesn&amp;#39;t seem like the smart kind of lazy. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;ll probably take you years of writing .Cast&amp;lt;T&amp;gt;.LINQ() before you catch up to the amount of effort you just put into this.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know how many places in your code use non-generics, but it seems like the best thing to do would have been to wrap those references to non-generics with something that&amp;#39;ll do the .Cast&amp;lt;T&amp;gt; for you. &amp;nbsp;Then it&amp;#39;d work for anything outside LINQ too.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1736682" width="1" height="1"&gt;</description></item><item><title>re: Bug with IQueryable and yield syntax: System.BadImageFormatException "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"</title><link>http://msmvps.com/blogs/matthieu/archive/2008/10/14/bug-with-iqueryable-and-yield-syntax-system-badimageformatexception-quot-an-attempt-was-made-to-load-a-program-with-an-incorrect-format-exception-from-hresult-0x8007000b-quot.aspx#1735935</link><pubDate>Wed, 28 Oct 2009 20:47:33 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1735935</guid><dc:creator>Jonathan (SMT)</dc:creator><description>&lt;p&gt;Has this bug been resolved yet? &amp;nbsp;I am still getting it now with VS 2008 and Win7.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1735935" 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>Generate a WCF service from an edmx with T4 v2</title><link>http://msmvps.com/blogs/matthieu/archive/2009/10/20/entity-framework-the-productivity-way.aspx#1735571</link><pubDate>Tue, 27 Oct 2009 09:49:02 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1735571</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;I recently published a T4 template to generate a WCF service . I updated it to be able to load its relationships&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1735571" width="1" height="1"&gt;</description></item><item><title>dynamic and indexer</title><link>http://msmvps.com/blogs/matthieu/archive/2008/10/27/c-4-dynamic-keyword.aspx#1734316</link><pubDate>Thu, 22 Oct 2009 16:21:12 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1734316</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;Remember one year ago, I wrote a post on how to use reflection with dynamic keyword . At this moment&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1734316" width="1" height="1"&gt;</description></item><item><title>re: Entity Framework Include with Func next</title><link>http://msmvps.com/blogs/matthieu/archive/2008/06/06/entity-framework-include-with-func-next.aspx#1734214</link><pubDate>Thu, 22 Oct 2009 08:50:48 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1734214</guid><dc:creator>Ralf</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks a lot for this code.&lt;/p&gt;
&lt;p&gt;I was looking for something like that since I do not want to have strings for names sitting there too.&lt;/p&gt;
&lt;p&gt;Now, I only have a strange problem: When I build a query and .Include it passes the data to the FuncToString routine as a ExpressionType.Convert (10) and not one of the three defined to work with.&lt;/p&gt;
&lt;p&gt;I added another line to the case section, like this&lt;/p&gt;
&lt;p&gt;Case ExpressionType.Convert&lt;/p&gt;
&lt;p&gt;Return TryCast(TryCast(TryCast(selector, UnaryExpression).Operand, MemberExpression).Member, Reflection.PropertyInfo).Name (VB Syntax)&lt;/p&gt;
&lt;p&gt;which is exactly the same as the .MemberAccess case except for another TryCase selector to UnaryExpression first.&lt;/p&gt;
&lt;p&gt;I have no idea what I am doing there, how why what when, but it seems to work. Has anybody a hint why this change is needed, or what I was doing wrong in the first place? Why do I end up with ExpressionType Convert??&lt;/p&gt;
&lt;p&gt;I have a second far harder question too: If you have two entities mapped m:n and the middle table of the database does not appear in your entity model (I like that...) I cannot get the function to work at all.&lt;/p&gt;
&lt;p&gt;Any hint on that?&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;
&lt;p&gt;Ralf&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1734214" width="1" height="1"&gt;</description></item><item><title>re: EDM can save your hair :-)</title><link>http://msmvps.com/blogs/matthieu/archive/2009/01/29/edm-can-save-your-hair.aspx#1732124</link><pubDate>Tue, 13 Oct 2009 07:44:23 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1732124</guid><dc:creator>Evan Smith</dc:creator><description>&lt;p&gt;Actually, I am pulling my hair out. &amp;nbsp;How do I in the EDM Modeling tool in Visual Studio 2008, tell the entity to allow the db to let the db generate the newsequentialid?&lt;/p&gt;
&lt;p&gt;Evan Smith&lt;/p&gt;
&lt;p&gt;Evan@ecsweb.com&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1732124" width="1" height="1"&gt;</description></item><item><title>re: POO is so pretty with C#</title><link>http://msmvps.com/blogs/matthieu/archive/2009/05/18/poo-is-so-pretty.aspx#1730977</link><pubDate>Fri, 09 Oct 2009 04:54:10 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1730977</guid><dc:creator>Morshed Anwar</dc:creator><description>&lt;p&gt;Sir , Can you please re-upload the your sample code. I cant download your code.thanx :). &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1730977" width="1" height="1"&gt;</description></item></channel></rss>