<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Pain to upgrade existing EDMX to DF 2010</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Pain to upgrade existing EDMX to DF 2010</description>
  <pubDate>Tue, 21 Apr 2026 22:24:05 -700</pubDate>
  <lastBuildDate>Wed, 28 Jul 2010 19:29:35 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2022</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Pain to upgrade existing EDMX to DF 2010 :  Ralph and Ken.Nelson,  Thanks...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7903#7903</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=412" rel="nofollow">Amy</a><br /><strong>Subject:</strong> 2022<br /><strong>Posted:</strong> 28-Jul-2010 at 7:29pm<br /><br /><DIV><P =Ms&#111;normal style="MARGIN: 0in 1.3pt 0.65pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">Ralph and Ken.Nelson,<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">Thanks for sharing your upgrade experience.&nbsp; Your posts will help the developers like me a lot.<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">Ting and Ward,<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">Thanks for the expert input <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">I'll try to do upgrade again soon and will post my expertise here.<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt 0pt"><SPAN lang=EN style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Verdana; mso-ansi-: EN; mso-bidi-: HI">Amy<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P></DIV>]]>
   </description>
   <pubDate>Wed, 28 Jul 2010 19:29:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7903#7903</guid>
  </item> 
  <item>
   <title>Pain to upgrade existing EDMX to DF 2010 : Ralph - thanks for your notes!  Curious...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7893#7893</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=482" rel="nofollow">WardBell</a><br /><strong>Subject:</strong> 2022<br /><strong>Posted:</strong> 28-Jul-2010 at 5:26pm<br /><br />Ralph - thanks for your notes!<DIV>&nbsp;</DIV><DIV>Curious about a few things.</DIV><DIV>&nbsp;</DIV><DIV><DIV><strong>1)</strong> We have run into something like your experience with assemblies downloaded over the web. Doesn't seem related to signing. Seems to relate to the way your internet settings and filters guard against nasty code. They block DLLs. You have to "unblock" them manually ... at least that's what we know to do at the moment.&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>--</DIV><DIV>&nbsp;</DIV><DIV><strong>3)</strong> Checkpointing was rarely used; obviously some folks used it ... because you did :-)&nbsp;&nbsp; I was one of those who could not find a good use for it. My main concern: if you saved and the saved failed, you couldn't roll back. We had to commit-in-memory before initiating save ... and we had no way to uncommit.</DIV><DIV>&nbsp;</DIV><DIV>I've used the 2-EntityManager approach for years. Works like a charm and it's both safe and easy to understand. The main manager holds ReadOnly entities. The user picks the entity to edit. Your code communicates that to a module holding the supporting EntityManager2.&nbsp; EntityManager2 is your "sandbox" and you can do anything you want in there without affecting the information displayed from entities in the main manager.&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>When it's time to save, you do that with EM2 (I never save anything with the MainManager ... I make that ReadOnly).&nbsp; You'll probably want to raise some kind of event (see EventAggregator pattern) so that the MainManager and associated displays update themselves to reflect the committed changes. This is easier than it sounds.</DIV><DIV>&nbsp;</DIV><DIV>You don't have to refresh from the database either. The EntityManager.ImportEntities feature makes it easy to copy entities from one EntityManager to another.</DIV><DIV>&nbsp;</DIV><DIV>--</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr><strong>4a)</strong>&nbsp; You wrote:</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>"<EM>Any field that is set in a partial class&nbsp;upon&nbsp;invocation at the server&nbsp;does not preserve its value when returned to the client.&nbsp; So, if you have an entity called 'Dog', and inside your partial class 'Dog' you set a string field called m_Name = "Fido", when the entity is returned to the client, m_Name will be set to null or string.empty</EM>"</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>Can you send me an example?&nbsp;I'm not sure under what scenario this worked in DF 2009 and no longer works in DF 2010.</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>Is the <EM>Name</EM> property (backed by m_Name I presume) a mapped (persisted) property? Or is it a custom property? If a custom property, did you remember to mark it as a &#091;DataMember&#093; so we know to serialize it?</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr><strong>4b)</strong>&nbsp; You wrote: </DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>"<EM>You must have public get/set properties for ALL fields that you want to set upon initialization.&nbsp; Unfortunately this opens your objects' fields to be set by other users.</EM>"</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>I am unaware of this restriction. Can you send me a confirming example. </DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>I know that you can't use "private" or "protected" for mapped properties if the model will be used in Silverlight. That's a Silverlight restriction, not a DevForce restriction. You can mark them "internal" though. That&nbsp;yields enough information hiding for most use cases; will it work for you?</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>--</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>You wrote: "<EM>just be prepared for a long uncomfortable battle during your upgrade process</EM>"</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>You are in the trenches, Ralph. I'm sure you know better than I.&nbsp; I've converted some apps without much trouble but then (a) they weren't huge, (b) I know where the bodies are buried, and (c) I've got the development team sitting right next door.</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>So ... yes ... you folks out there are shouldering a transition burden.</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>I must hope that you will continue to communicate your experience and suggestions to help those who follow in your pioneering footsteps. We really appreciate your help and forebearance.&nbsp; I believe the journey really is worth it ... and that you will come to believe that as well.</DIV></DIV>]]>
   </description>
   <pubDate>Wed, 28 Jul 2010 17:26:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7893#7893</guid>
  </item> 
  <item>
   <title>Pain to upgrade existing EDMX to DF 2010 : Ting wrote: &amp;#034;When you do...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7888#7888</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=482" rel="nofollow">WardBell</a><br /><strong>Subject:</strong> 2022<br /><strong>Posted:</strong> 28-Jul-2010 at 5:01pm<br /><br />Ting wrote: "When you do migrate, make sure to include the foreign keys as properties on the entities"<DIV>&nbsp;</DIV><DIV>Let me elaborate a little. Your choice of whether or not to expose FK ids goes beyond the visibility of the FK Id property itself ... it goes to how association XML is generated in the EDMX.&nbsp; I haven't taken the time yet to decypher the details yet but I know there's a snake in the grass somewhere. And I know you have to make the decision to expose FK Ids early in your EDM design ... as I 'll explain below.</DIV><DIV>&nbsp;</DIV><DIV>There is no switch in the EF Designer UI to throw it from one mode&nbsp;to the other. The only place I've found IN THE UI&nbsp;where you can make this choice globally for the model is in the Wizard ... when you pick the "Generate from Database" option.</DIV><DIV>&nbsp;</DIV><DIV>&#091;Aside: you can "throw the switch" in the EDMX XML but (a) why do it the hard way and (b) doing so will only affect subsequent association generation; it won't "correct" existing associations. It will be too late later.&#093;</DIV><DIV>&nbsp;</DIV><DIV>With "400+ tables" to convert, your only reasonable conversion&nbsp;path is to use the EF Wizard to "Generate from Database". You can do it in chunks (Using the Wizard to "Update from Database" to add the next round of entities) ... or shoot for the moon and do it all at once ... which is what I'd probably do.</DIV><DIV>&nbsp;</DIV><DIV><strong><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </EM>MAKE SURE that you have checkmarked&nbsp;both&nbsp;"Expose FK Ids" and "Pluralize"!</strong></DIV><DIV>&nbsp;</DIV><DIV>There are other differences between DF 2009 (5.x) and DF 2010 (6.x) to work through. You might want to get your feet wet by converting a "Hello World" scale application first ... even if this means writing such an app in DF 2009 first.</DIV><DIV>&nbsp;</DIV><DIV>Assuming you have that under your belt, you can bring in your new model. Compile. And analyze the inevitable compiler errors.&nbsp; What might these be:</DIV><DIV>&nbsp;</DIV><DIV><strong>Namespace / Custom EntityManager / DataSource Key</strong></DIV><DIV>&nbsp;</DIV><DIV>You may have to change these values.</DIV><DIV>&nbsp;</DIV><DIV>The namespace&nbsp;of generated classes will be the default namespace of the project.&nbsp;That's set in the project properties. You can change that&nbsp;at anytime and regenerate your entity classes.</DIV><DIV>&nbsp;</DIV><DIV>Set "EntityManagerName"&nbsp; and the "DataSource Key" are at&nbsp;model-level in&nbsp;the "DevForce" section&nbsp;of the EF Model Browser's property sheet.</DIV><DIV>&nbsp;</DIV><DIV><strong>Pluralization Differences</strong></DIV><DIV>&nbsp;</DIV><DIV>The EF Wizard pluralizes a little differently than we do. You'll pick out those differences right away and use the VS refactoring tools to clean those up.</DIV><DIV>&nbsp;</DIV><DIV>Suggestion: Get <a href="http://www.jetbrains.com/resharper/" target="_blank">ReSharper </A>if you don't have it already. It is far better at refactoring than VS 2010.</DIV><DIV>&nbsp;</DIV><DIV><strong>Massive Renaming</strong></DIV><DIV>&nbsp;</DIV><DIV>Perhaps your DBA forced you to prefix table and column names (e.g., INV_Invoice, PER_Person, COM_Company). You probably went through a lot of effort to strip off those prefixes in your DF 2009 model. You'll have to do it again.</DIV><DIV>&nbsp;</DIV><DIV>I know of one tool out there that might help with massive renaming: <a href="http://www.huagati.com/dbmltools/" target="_blank">http://www.huagati.com/dbmltools/</A></DIV><DIV>&nbsp;</DIV><DIV>Or you can apply some form of regex search-and-replace tool to your EDMX; I'd give that a look first.</DIV><DIV>&nbsp;</DIV><DIV><strong>No more "_fk_" Foreign Key&nbsp;Ids</strong></DIV><DIV>&nbsp;</DIV><DIV>"Company_CompanyId_fk_Id"&nbsp;becomes "CompanyId". Global search and replace accordingly.</DIV><DIV>&nbsp;</DIV><DIV><strong>Inheritance</strong></DIV><DIV>&nbsp;</DIV><DIV>Did you use that in your old code? You'll have to rebuild your inheritance relationships. Hope you don't have too many of them. It's just basic blocking and tackling. The options are the same. The VS 2010 designer is more supportive.</DIV><DIV>&nbsp;</DIV><DIV><strong>Property Access</strong></DIV><DIV>&nbsp;</DIV><DIV>If you any of your mapped properties were other than "public", you'll have to reapply those changes. Search your original generated code for "internal", "protected", "private"; these will almost always front properties you modified in the DF 2009 Object Mapper.</DIV><DIV>&nbsp;</DIV><DIV><strong><EM>Important</EM></strong>!&nbsp; If you intend to use your model in Silverlight application and you want a property to be other than "public", make it "internal".&nbsp; We can find "internal" properties. Silverlight prevents us from finding "protected" or "private" properties.</DIV><DIV>&nbsp;</DIV><DIV><strong><EM>New Option</EM></strong>: You can delete one side of a navigation property. You really shouldn't be able to navigate from "Gender" to "Person"; delete the Gender's "Persons" navigation property.</DIV><DIV>&nbsp;</DIV><DIV><strong>Validation Options</strong></DIV><DIV>&nbsp;</DIV><DIV>If you messed with these you'll have to reapply them. You can change the model level default in the "ValidationAttribute Mode" setting in the "DevForce" section&nbsp;of the EF Model Browser's property sheet.</DIV><DIV>&nbsp;</DIV><DIV>Property level&nbsp;validation options are different in DF 2010. The "Validation" option under the "Attributes to Suppress" setting may do the trick.&nbsp;Let us know if you get stuck here.</DIV><DIV>&nbsp;</DIV><DIV><strong>Unmapped&nbsp;Abstract Entity&nbsp;Classes</strong></DIV><DIV>&nbsp;</DIV><DIV>In both DF 2009 and DF 20010 you can put your own logic in a custom base class that isn't mapped to anything. Many folks create their own "EntityBase" that sits on top of our "Entity" class and just below their concrete entity classes (e.g., "Customer", "Employee").&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>You'll have to tell DevForce about this if you're using a base class. </DIV><DIV>&nbsp;</DIV><DIV>If you have one type that you use for alll (or almost all) entities in this model, type the name of this "Default Base" class into the "Injected Base Type" setting at&nbsp;model-level in&nbsp;the "DevForce" section&nbsp;of the EF Model Browser's property sheet. Remember to include the namespace if your base class is in an assembly other than&nbsp;your model&nbsp;project &nbsp;(e.g, "<U>CommonEntity.EntityBase</U>"). Your base class must inherit from <strong>IdeaBlade.Entity</strong>&nbsp;... unless you were modeling with POCOs instead of doing code generation (another side topic).</DIV><DIV>&nbsp;</DIV><DIV><DIV>In DF 2009 you could insert unmapped base classes in the middle of an inheritance tree. For example:&nbsp; Apple -&gt; <U>FruitBase</U> -&gt; Produce -&gt; <U>EntityBase</U> -&gt; IdeaBlade.Entity.&nbsp; "FruitBase" is your abstract class between two mapped classes, "Apple" and "Produce".</DIV></DIV><DIV>&nbsp;</DIV><DIV>You can't do that in Entity Framework v.4 and therefore you can't do that in DF 2010. You'll have to come up with another approach to specify common "Fruit" behavior for your apples and oranges. I have some compositional strategies in mind.</DIV><DIV>&nbsp;</DIV><DIV>You can stack multiple base classes but they all have to reside below the first mapped entity ... Apple -&gt; <U>FruitBase</U> -&gt; <U>EntityBase</U> -&gt; IdeaBlade.Entity. </DIV><DIV>&nbsp;</DIV><DIV>Unfortunately, you can't specify different abstract base classes for different mapped entity classes through the UI. You can't have concrete fruit types inherit from "FruitBase" while concrete meat types inherit from your custom "MeatBase". You'll have to either post-process the generated code (which will be wiped out the next time you regenerate) or customize our code generation.</DIV><DIV>&nbsp;</DIV><DIV><strong>Custom Code Generation</strong></DIV><DIV>&nbsp;</DIV><DIV>The (almost) universal solvent is custom code generation. It is really easy in DF 2010 to customize the code we generate. We are using T4 templates for code generation. We've got a nice customization API over our T4 so you don't have to wrestle with that technology.</DIV><DIV>&nbsp;</DIV><DIV>Code generation customization lets you intercept the EDMX XML, interpret it yourself, and emit your own code. You might get out of some jams with this technique.</DIV><DIV>&nbsp;</DIV><DIV>Such are my current&nbsp;ideas on the subject. It's a far cry from the automated conversion tool you seek. I bet it will cost you a day or two to convert 400 entities. The compiler will surely help; just&nbsp;about everything that will go wrong will be caught by the compiler. </DIV><DIV>&nbsp;</DIV><DIV>Do let us know ... we are curious.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 28 Jul 2010 17:01:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7888#7888</guid>
  </item> 
  <item>
   <title>Pain to upgrade existing EDMX to DF 2010 : Yes, the migration across architectures...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7873#7873</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 2022<br /><strong>Posted:</strong> 28-Jul-2010 at 2:54pm<br /><br />Yes, the migration across architectures is a bit of an undertaking.&nbsp; Some of the pain is unavoidable, but some we could have made easier with documentation (see the 6.0.1 section in the Release Notes for notices in key areas). <DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>Unfortunately, for one of the larger items - EDMX migration, Microsoft changed the spec considerably and did not provide a migration tool to move the .NET 3.5 EDMX to .NET 4.0, so this meant that their recommendation was to rebuild the model again with the new Entity Framework.&nbsp; We don't have the full spec for the EDMX, so writing this tool ourselves would have been a bit risky and out-of-scope for us.&nbsp; Some of the other changes you are seeing were also decided by Microsoft and we are following their standard.&nbsp; When you do migrate, make sure to include the foreign keys as properties on the entities.&nbsp; If you don't, you'll get an "Index was outside the bounds of the array" (or similar) exception.</DIV><DIV>&nbsp;</DIV><DIV>Regarding the signed assemblies on the server.&nbsp; I was not aware of this, but will&nbsp;take a look at it.</DIV><DIV>&nbsp;</DIV><DIV>Also, for anyone following along, there's more information about serialization of custom properties here:</DIV><DIV><a href="http://www.ideablade.com/forum/forum_posts.asp?TID=1957" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=1957</A></DIV><DIV>&nbsp;</DIV><DIV>Finally, for the stored procedures, jmpinchot reports that everything is working in DevForce 6.0.4.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><span style="font-size:10px"><br /><br />Edited by ting - 28-Jul-2010 at 3:08pm</span>]]>
   </description>
   <pubDate>Wed, 28 Jul 2010 14:54:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7873#7873</guid>
  </item> 
  <item>
   <title>Pain to upgrade existing EDMX to DF 2010 : We ended up alleviating some of...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7854#7854</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=452" rel="nofollow">ken.nelson</a><br /><strong>Subject:</strong> 2022<br /><strong>Posted:</strong> 28-Jul-2010 at 8:22am<br /><br /><DIV>We ended up alleviating some of the _fk_ problem by doing a solution wide search and replace of "_fk_" to "".&nbsp; This didn't fix them all but was a decent start.</DIV><DIV>&nbsp;</DIV><DIV>It also seems like the navigation property generator is not as robust as the 2009 version, as it left us with a bunch of navigation properties&nbsp;named "Image" and "Image1" instead of "PatchImage" and "SymbolImage" even though the foreign keys were named with Patch and Symbol.&nbsp; If you look at the relation in the navigation property properties, you can figure out how to name it properly (tedious, but worked).</DIV><DIV>&nbsp;</DIV><DIV>And if you're using any StoredProcQuery, they currently&nbsp;need a&nbsp;workaround to function properly.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>See here:<BR><a href="http://www.ideablade.com/forum/forum_posts.asp?TID=1968&amp;KW=stored&amp;PID=7739#7739" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=1968&amp;KW=stored&amp;PID=7739#7739</A></DIV>]]>
   </description>
   <pubDate>Wed, 28 Jul 2010 08:22:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7854#7854</guid>
  </item> 
  <item>
   <title>Pain to upgrade existing EDMX to DF 2010 : Hi Amy,  We just finished the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7853#7853</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=876" rel="nofollow">Ralph</a><br /><strong>Subject:</strong> 2022<br /><strong>Posted:</strong> 28-Jul-2010 at 8:09am<br /><br /><P>Hi Amy, </P><DIV>We just finished the upgrade as well, and discovered a few caveats that were unexpected and painful:&nbsp; </DIV><BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr><DIV>1) Signing the assemblies causes a 'Target Invocation Exception' to be thrown when retrieving your entity models from the server.&nbsp; I was able to get this same message using DevForce's sample project.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>2) Changing the entity event argument object types on fetched, login, and save events.&nbsp; This wasn't too bad, since the compiler did most of the work, but it did affect a good chunk of our code.</DIV><DIV>&nbsp;</DIV><DIV>3) The checkpoint manager has been removed.&nbsp; According to DevForce, this feature wasn't used by many people (although I can't imagine how they came up with this conclusion), so they decided to remove it.&nbsp; Their suggestion is to use 2 entity managers and manually manage this yourself.&nbsp; </DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>4) Any field that is set in a partial class&nbsp;upon&nbsp;invocation at the server&nbsp;does not preserve its value when returned to the client.&nbsp; So, if you have an entity called 'Dog', and inside your partial class 'Dog' you set a string field called m_Name = "Fido", when the entity is returned to the client, m_Name will be set to null or string.empty (I'm curious as to how DevForce is creating the objects on the clients w/o the class constructors being called at the client).&nbsp; You must have public get/set properties for ALL fields that you want to set upon initialization.&nbsp; Unfortunately this opens your objects' fields to be set by other users.</DIV></BLOCKQUOTE><DIV dir=ltr>I feel like I'm forgetting a few things, but just be prepared for a long uncomfortable battle during your upgrade process.&nbsp; I'm sure their changes are for the better, but we were disappointed with how much work the entire process was.&nbsp; Good luck.</DIV><DIV dir=ltr>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 28 Jul 2010 08:09:39 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7853#7853</guid>
  </item> 
  <item>
   <title>Pain to upgrade existing EDMX to DF 2010 : One correction: After I changed...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7848#7848</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=412" rel="nofollow">Amy</a><br /><strong>Subject:</strong> 2022<br /><strong>Posted:</strong> 28-Jul-2010 at 6:40am<br /><br /><P>One correction: After I changed the project target FrameWork to 4, the 'Include FK in the Model' check box is not grayed out any more, but the FK format problem still remains.</P><DIV>&nbsp;</DIV><DIV>Thanks!</DIV><DIV>&nbsp;</DIV><DIV>Amy</DIV>]]>
   </description>
   <pubDate>Wed, 28 Jul 2010 06:40:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7848#7848</guid>
  </item> 
  <item>
   <title>Pain to upgrade existing EDMX to DF 2010 : Hi Everyone,   Did any one upgrade...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7847#7847</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=412" rel="nofollow">Amy</a><br /><strong>Subject:</strong> 2022<br /><strong>Posted:</strong> 28-Jul-2010 at 5:47am<br /><br /><P =Ms&#111;normal style="MARGIN: 0in 1.3pt 0.65pt"><SPAN lang=EN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-: HI; mso-ansi-: EN">Hi Everyone, <?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-: HI; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-: HI; mso-ansi-: EN">Did any one upgrade existing EDMX(like from v. 5.x.x.x)&nbsp; to DevForce 2010 yet? <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-: HI; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-: HI; mso-ansi-: EN">Currently we are using version 5.2.3.1 and VS 2008. Our database includes 400+ tables.&nbsp; I was trying to upgrade to &nbsp;VS2010 and using DevForce 2010.&nbsp; There is not much <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>instruction how I can upgrade the existing EDMX easily.&nbsp;&nbsp; I upgraded my solution and&nbsp;refreshed the&nbsp;DevForce dlls with new ones.&nbsp;&nbsp;&nbsp; Open my&nbsp;existing &nbsp;EDMX --&gt; Update Model from database,&nbsp; the 1st thing I noticed that the 'Include FK in the model' is grayed out. But that check box is required to be checked to pass the compiling.&nbsp; If I started everything from scratch, I will lose everything I changed in old <?: prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:place w:st="&#111;n">OM.</st1:place>&nbsp; For example In NorthwindIB database table, the Employee table has FK to itself(ReoptsToEmployeeID), in the old OM,&nbsp; it is already nicely renamed to Manger &amp; DirecReports; if I recreated the EDMX in DF2010, I have to go thru all the renaming procedure again, plus the old FK was created at&nbsp; Manager_fk_EmployeeID format,&nbsp; the DF 2010 doesn't follow the format _fk_ any more, we have to make a lot code changes for that too.&nbsp;&nbsp;It seems too much to do the upgrade to DF2010. <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-: HI; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-: HI; mso-ansi-: EN">In the past, every time&nbsp;we upgraded to a new version DF,&nbsp; we have to make code changes: either some DevForce&nbsp;dlls is no longer supported or the function/property is obsolete.&nbsp; Never pain free. This&nbsp; time,&nbsp; the pain is unbearable. Basically I gave it up to upgrade to DF2010, until somebody show me an easy way, may be I went to wrong direction?&nbsp; <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-: HI; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-: HI; mso-ansi-: EN">Please help!<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-: HI; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0.65pt 1.3pt"><SPAN lang=EN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-: HI; mso-ansi-: EN">Thanks!</SPAN></P><DIV>&nbsp;</DIV><DIV>Amy</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 28 Jul 2010 05:47:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2022&amp;PID=7847#7847</guid>
  </item> 
 </channel>
</rss>