<?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 : Code Second Migration Issues</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : Code Second Migration Issues</description>
  <pubDate>Tue, 12 May 2026 21:24:51 -700</pubDate>
  <lastBuildDate>Thu, 07 Feb 2013 19:20:40 -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=3980</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>Code Second Migration Issues :   Since you have control over...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15853#15853</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 07-Feb-2013 at 7:20pm<br /><br />Since you have control over your Code First entity class definitions, one option is to implement ICloneable in code.<div>&nbsp;</div><div>A back door of a sort is to take advantage of the fact that Code First entities do have an injected EntityAspect, which you normally&nbsp;don't want to expose directly, but instead use something like an "EntityFacts" class as described here - <a href="http://drc.ideablade.com/devforce-2012/bin/view/&#068;ocumentati&#111;n/code-first-entityaspect#HEntityFacts" target="_blank">http://drc.ideablade.com/devforce-2012/bin/view/Documentation/code-first-entityaspect#HEntityFacts</a>.&nbsp; Anyway, EntityAspect.CloneCore() will clone the entity.&nbsp; There's one problem here, though, in that this clone will have an incorrect EntityState which you'll need to reset.&nbsp; Here's a rough way to do it:</div><div>&nbsp;</div><div>&nbsp; var clone = EntityAspect.Wrap(anEntity).CloneCore().Entity as IEntity;<br>&nbsp; clone.EntityAspect.EntityState = EntityState.Detached;</div><div>&nbsp; </div>]]>
   </description>
   <pubDate>Thu, 07 Feb 2013 19:20:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15853#15853</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues : My next issue is that the entities...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15852#15852</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 07-Feb-2013 at 6:42pm<br /><br />My next issue is that the entities no longer have Ideablade.EntityModel.Entity as a base class<div><br></div><div>Which means I am having issues with things like cloning.</div><div><br></div><div>I currently use</div><div><br></div><div><br></div><div><div>&nbsp;public static T Clone&lt;T&gt;(&#091;NotNull&#093; this T source, int level = 0) where T : Entity</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (source == null) throw new ArgumentNullException("source");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var handledEntities = new Dictionary&lt;Entity, Entity&gt;();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return source.InternalClone(level, handledEntities);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; private static T InternalClone&lt;T&gt;(&#091;NotNull&#093; this T source, int level, IDictionary&lt;Entity, Entity&gt; handledEntities) where T: Entity</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var res = (source as ICloneable).Clone() as T;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; handledEntities&#091;source&#093; = res;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (level &gt; 0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (var pi in source.GetType().GetProperties().Where(pi =&gt; pi.CanRead))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pi.PropertyType.IsChildOf(typeof(RelatedEntityList&lt;&gt;)))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var sList = pi.GetValue(source, null) as IList;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var list = pi.GetValue(res, null) as IList;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (sList != null &amp;&amp; list != null)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (Entity item in sList)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var cItem = handledEntities.ContainsKey(item)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ? handledEntities&#091;item&#093;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : item.InternalClone(level - 1, handledEntities);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; list.Add(cItem);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (pi.CanWrite &amp;&amp; pi.PropertyType.IsSubclassOf(typeof(Entity)))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var sInstance = pi.GetValue(source, null) as Entity;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (sInstance != null)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var clonedEntity = handledEntities.ContainsKey(sInstance)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ? handledEntities&#091;sInstance&#093;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : sInstance.InternalClone(level - 1, handledEntities);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pi.SetValue(res, clonedEntity, null);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return res;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>Do you have any advice on how I can now hande this?</div><div><br></div><div><br></div></div>]]>
   </description>
   <pubDate>Thu, 07 Feb 2013 18:42:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15852#15852</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues : Ok it seems I can do the followingv.AddTriggers(...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15851#15851</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 07-Feb-2013 at 5:39pm<br /><br />Ok it seems I can do the following<div><div>&nbsp;v.AddTriggers(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Sample.EntityPropertyNames.SampleType_id,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Sample.EntityPropertyNames.Standard_id</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;);</div></div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Thu, 07 Feb 2013 17:39:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15851#15851</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues : So for adding a triggerv.AddTriggers(...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15850#15850</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 07-Feb-2013 at 5:27pm<br /><br />So for adding a trigger<div><br></div><div><div>&nbsp;v.AddTriggers(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Lithology.PropertyMetadata.IntervalFrom.Name,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Lithology.PropertyMetadata.IntervalTo.Name);</div></div><div><br></div><div>I can access the PropertyMetadata by adding your previous code</div><div><br></div><div><div>&nbsp;public static IbEm.EntityMetadata PropertyMetadata</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get { return IbEm.EntityMetadataStore.Instance.GetEntityMetadata(typeof(Lithology)); }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div></div><div><br></div><div>to the Lithology Class.</div><div><br>However I an unsure as to how to access the property name that the addtrigger code needs.</div><div><br></div><div>thanks for you help</div>]]>
   </description>
   <pubDate>Thu, 07 Feb 2013 17:27:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15850#15850</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues : Sorry my mistake I worked out...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15849#15849</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 07-Feb-2013 at 5:17pm<br /><br />Sorry my mistake I worked out the PathFor.<div><br></div><div>Still struggling with the PropertyMetadata though</div>]]>
   </description>
   <pubDate>Thu, 07 Feb 2013 17:17:13 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15849#15849</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues : Thanks for the replyI am still...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15848#15848</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 07-Feb-2013 at 5:09pm<br /><br />Thanks for the reply<div><br></div><div>I am still struggling with this.</div><div><br>I am trying to implement a cross type verifier.</div><div><br></div><div>&lt;quote&gt;</div><div><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb0, 0, 255;">private</span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> </span><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb0, 0, 255;">static</span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> Verifier GetOrderDateAfterHiredVerifier() {</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> </span><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb43, 145, 175;">string</span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> description =</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> &nbsp;&nbsp;</span><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb163, 21, 21;">"OrderDate must be after the sales rep's HireDate."</span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">;</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">&nbsp;&nbsp;DelegateVerifier&lt;Order&gt; v = </span><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb0, 0, 255;">new</span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> DelegateVerifier&lt;Order&gt;(</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description, OrderDateAfterHiredCondition);</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">&nbsp;&nbsp;v.VerifierOptions.ExecutionModes =</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">&nbsp;&nbsp;&nbsp;&nbsp;VerifierExecutionModes.InstanceAndOnAfterSetTriggers;</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">&nbsp;&nbsp;v.AddTrigger(Order.PathFor(o =&gt; o.OrderDate));</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">&nbsp;&nbsp;v.AddTrigger(</span><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb0, 0, 255;">new</span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> TriggerLink(</span><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb0, 0, 255;">new</span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> TriggerItem</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">&nbsp;&nbsp;&nbsp;&nbsp;(</span><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb0, 0, 255;">typeof</span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">(Employee), Employee.PathFor(e =&gt; e.HireDate)),</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">&nbsp;&nbsp;&nbsp;&nbsp;e =&gt; ((Employee)e).Orders,</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> &nbsp;&nbsp;</span><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb0, 128, 0;">// Path from trigger (Employee) to Order<br style="font-size: 8pt;"></span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> &nbsp;&nbsp;</span><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb0, 0, 255;">true</span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">)); &nbsp;&nbsp;</span><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb0, 128, 0;">// True = that path returns multiple orders<br style="font-size: 8pt;"></span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> </span><span style="border: 0px; font-family: 'courier new', monospace; font-size: 10.909090995788574px; margin: 0px; outline: 0px; padding: 0px; vertical-align: line; line-height: normal; white-space: pre; : rgb214, 227, 188; color: rgb0, 0, 255;">return</span><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"> v;</span><br style="font-family: 'courier new', monospace; font-size: 10.909090995788574px; white-space: pre; color: rgb77, 77, 77; line-height: normal; : rgb214, 227, 188;"><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">}</span></div><div><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;">&lt;/quote&gt;</span></div><div><span style="color: rgb77, 77, 77; font-family: 'courier new', monospace; font-size: 10.909090995788574px; line-height: normal; white-space: pre; : rgb214, 227, 188;"><br></span></div><div>and that code you provided does not work for the PathFor in this example ( copied from your&nbsp;documentation). Do you have any examples of verifiers working in code-first implementations?</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Thu, 07 Feb 2013 17:09:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15848#15848</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues :   Sorry, we don&amp;#039;t currently...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15843#15843</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 07-Feb-2013 at 11:20am<br /><br />Sorry, we don't currently have any documentation describing how to move an EDMX-based model to Code First.<div>&nbsp;</div><div>In the EDMX-generated code, you'll see the PathFor method generated for every entity class like so:</div><div>&nbsp;</div><div>&nbsp;public static string PathFor(System.Linq.Expressions.Expression&lt;System.Func&lt;Employee, object&gt;&gt; expr) {<br>&nbsp;&nbsp; return IbCore.PropertyPath.For&lt;Employee&gt;(expr);<br>&nbsp;}</div><div>&nbsp;</div><div>You have several options for how you handle this:&nbsp; one would be to directly call the IdeaBlade.Core.PropertyPath method instead of using PathFor; another would be to include this helper method in your entity class definitions; and another might be to include this in a base or helper class as a generic method:&nbsp; </div><div>&nbsp;</div><div>public static string PathFor&lt;T&gt;(System.Linq.Expressions.Expression&lt;System.Func&lt;T, object&gt;&gt; expr) {<br>&nbsp; return PropertyPath.For&lt;T&gt;(expr);<br>}</div><div>&nbsp;</div><div>The PropertyMetadata is a bit different.&nbsp; In EDMX-based models PropertyMetadata is a nested class within each entity holding the static data property definitions for the entity.&nbsp; In a Code First model, all metadata is dynamically loaded from the ibmmx file, and is available in the EntityMetadataStore.&nbsp;&nbsp; </div><div>&nbsp;</div><div>So again you should decide how best to architect this in your solution.&nbsp; You can access metadata for an entity like so:</div><div>&nbsp;</div><div>&nbsp; public static EntityMetadata PropertyMetadata {<br>&nbsp;&nbsp;&nbsp; get { return EntityMetadataStore.Instance.GetEntityMetadata(typeof(Employee)); }<br>&nbsp; }</div><div>&nbsp;</div><div>Entity properties are available from the EntityMetadata in several ways, for example:</div><div>&nbsp;&nbsp; Employee.PropertyMetadata.EntityProperties</div><div>&nbsp;&nbsp; Employee.PropertyMetadata.DataProperties</div><div>&nbsp;&nbsp; Employee.PropertyMetadata.NavigationProperties</div><div>&nbsp;&nbsp; ... and others</div><div>&nbsp;</div><div>So you might have a simple helper method like the following:</div><div>&nbsp; public static EntityProperty GetPropertyMetadata(string prop) {<br>&nbsp;&nbsp;&nbsp; return PropertyMetadata.EntityProperties&#091;prop&#093;;<br>&nbsp; }</div><div>&nbsp;</div><div>More information on the metadata available is here - <a href="http://drc.ideablade.com/devforce-2012/bin/view/&#068;ocumentati&#111;n/model-examine" target="_blank">http://drc.ideablade.com/devforce-2012/bin/view/Documentation/model-examine</a>.</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;&nbsp; </div><div>&nbsp;</div><div><br><br>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Thu, 07 Feb 2013 11:20:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15843#15843</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues :    Originally posted by kimjThere...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15834#15834</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 06-Feb-2013 at 9:31pm<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by kimj</strong></em><br /><br /><span style="line-height: 1.4;">&nbsp;There are also some constructs in use, such as PathFor and PropertyMetadata, which aren't defined for Code First entities.</span><div><br></div></td></tr></table><div><br></div><div>These are both generated by devforce in the EDM version. Do you have any code that I could add to a base class that replicates this functionality?</div><div><br></div><div>PropertyMetadata and pathfor I use extensively for verifiers. ( as per your documenation)</div><span style="font-size:10px"><br /><br />Edited by murray.bryant - 06-Feb-2013 at 9:41pm</span>]]>
   </description>
   <pubDate>Wed, 06 Feb 2013 21:31:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15834#15834</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues : The project worked fine when using...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15833#15833</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 06-Feb-2013 at 8:19pm<br /><br />The project worked fine when using the EDM<div><br></div><div>As you say what I seem to be running into is the functionality that is not present in code-first that is there for the edm use.</div><div><br></div><div>It would be nice if these differences were documented somewhere. Do you know where such a resource is?</div><div><br></div><div>I will work through the rest of the build errors. I guess I was hoping some of these would disappear once the ibmmx process occurred. But it seems that was wrong.</div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Wed, 06 Feb 2013 20:19:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15833#15833</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues :   Does this project actually...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15831#15831</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 06-Feb-2013 at 7:17pm<br /><br />Does this project actually build successfully?&nbsp; The ibmmx metadata file is only created if the assembly can be built without errors, as the EntityModelMetadataDeploy task kicks in after a successful compilation.<div>&nbsp;</div><div>I notice that the ProvideEntityAspect attribute is specified on both the base and derived classes, which is one problem.&nbsp; There are also some constructs in use, such as PathFor and PropertyMetadata, which aren't defined for Code First entities.</div><div>&nbsp;</div><div>Once you fix the build problems the metadata files should generate.</div>]]>
   </description>
   <pubDate>Wed, 06 Feb 2013 19:17:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15831#15831</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues : I have zipped and sent through...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15829#15829</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 06-Feb-2013 at 5:16pm<br /><br />I have zipped and sent through to IdeabladeSupportTrack<div><br></div><div>There were no Ideablade* files in teh MSBuild directories</div>]]>
   </description>
   <pubDate>Wed, 06 Feb 2013 17:16:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15829#15829</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues :   We&amp;#039;ve seen some issues...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15827#15827</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 06-Feb-2013 at 5:02pm<br /><br />We've seen some issues with the DevForce 2010 uninstall not cleanly removing MSBuild targets.&nbsp; Check your \program files (x86)\MSBuild\v4.0 folder for an IdeaBlade.*.targets file and remove it if found.&nbsp; There might also be an IdeaBlade folder under the MSBuild folder, and that can be removed too.<div>&nbsp;</div><div>If that's not causing the problem, can you zip up the project in question and either upload here or send to our IdeaBladeSupportTrack email address?</div>]]>
   </description>
   <pubDate>Wed, 06 Feb 2013 17:02:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15827#15827</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues : And yes all my references are...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15826#15826</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 06-Feb-2013 at 4:25pm<br /><br />And yes all my references are Ideablade 7.0.3]]>
   </description>
   <pubDate>Wed, 06 Feb 2013 16:25:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15826#15826</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues :  I uninstalled all of my devforce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15825#15825</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 06-Feb-2013 at 4:15pm<br /><br />I uninstalled all of my devforce 2010 a while back<div><br></div><div>In the detailed log for the model project build there is no mention of&nbsp;<span style=": rgb251, 251, 253; line-height: 1.4;">EntityModelMetadataDeploy</span></div><div><span style=": rgb251, 251, 253; line-height: 1.4;"><br></span></div><div><span style=": rgb251, 251, 253; line-height: 1.4;">what could be causing this?</span></div><span style="font-size:10px"><br /><br />Edited by murray.bryant - 06-Feb-2013 at 4:24pm</span>]]>
   </description>
   <pubDate>Wed, 06 Feb 2013 16:15:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15825#15825</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues :   The &amp;#034;EntityModelMetadataDeploy&amp;#034;...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15824#15824</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 06-Feb-2013 at 4:08pm<br /><br />The "EntityModelMetadataDeploy" task should be showing up in the MSBuild output, but then it will also raise build warnings and errors when it encounters problems, and these would be hard to miss.<div>&nbsp;</div><div>Do you also have DF2010 installed?&nbsp; If so, double check that all IdeaBlade assembly references are pointing to version 7.0.3.&nbsp; If you have a version of DF2010 prior to 6.1.9 that will cause problems too, as side-by-side installations of both products are only supported with 6.1.9 and above.</div>]]>
   </description>
   <pubDate>Wed, 06 Feb 2013 16:08:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15824#15824</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues : Yes it is 2012 that is installedthe...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15823#15823</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 06-Feb-2013 at 3:33pm<br /><br />Yes it is 2012 that is installed<div><br></div><div>the project seems to be installed</div><div><br></div><div><div>&nbsp;&lt;Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /&gt;</div><div>&nbsp; &lt;Import Project="$(SolutionDir)\.nuget\nuget.targets" /&gt;</div><div>&nbsp; &lt;Import Project="..\packages\PostSharp.2.1.7.28\tools\PostSharp.targets" Condition="Exists('..\packages\PostSharp.2.1.7.28\tools\PostSharp.targets')" /&gt;</div><div>&nbsp; &lt;Import Project="..\packages\IdeaBlade.DevForce.Aop.7.0.3\tools\IdeaBlade.DevForce.Common.targets" Condition="Exists('..\packages\IdeaBlade.DevForce.Aop.7.0.3\tools\IdeaBlade.DevForce.Common.targets')" /&gt;</div><div>&nbsp;</div></div><div><br></div><div>I already posted the result from the normal msbuild. Looking through the verbose setting is hard to spot anything. Can you post what should be showing in the build. Or something I can search for in the output.</div><div><br></div><div>thanks</div><div><br>Murray</div>]]>
   </description>
   <pubDate>Wed, 06 Feb 2013 15:33:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15823#15823</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues :   Make sure that it was the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15819#15819</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 06-Feb-2013 at 9:48am<br /><br />Make sure that it was the DevForce 2012 Code First NuGet package that you installed - we also have a similar package for DF2010.&nbsp; You can also check that the package installed correctly by looking at the project file contents.&nbsp; Here's a link showing what to look for:&nbsp; <a href="http://drc.ideablade.com/devforce-2012/bin/view/&#068;ocumentati&#111;n/code-first-entity-classes#HInstallDevForceCodeFirstsupport" target="_blank">http://drc.ideablade.com/devforce-2012/bin/view/Documentation/code-first-entity-classes#HInstallDevForceCodeFirstsupport</a><div>&nbsp;</div><div>If the package is installed but the problem persists, turn up the verbosity of the MSBuild output to "normal" or higher (via the VS Tools menu) to see if anything shows up during the build.</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Wed, 06 Feb 2013 09:48:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15819#15819</guid>
  </item> 
  <item>
   <title>Code Second Migration Issues :  HiI am trying to migrate an...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15808#15808</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3980<br /><strong>Posted:</strong> 05-Feb-2013 at 11:31pm<br /><br />Hi<div><br></div><div>I am trying to migrate an existing project across to code-first.</div><div><br></div><div>I have followed the steps from the documentation</div><div><br></div><div>- Change Template to CodeFirst and Save</div><div>- Add nuget code-first package</div><div>- Create new Model.cs file copy pocos to file</div><div>- Delete old EDMX</div><div>- Change Connection String</div><div><br></div><div>When I then build the project nothing happens. No ibmmx is generated</div><div><br></div><div>in the output</div><div><br></div><div><div>&gt;------ Build started: Project: Torpedo.Geo.Model, Configuration: Debug Any CPU ------</div><div>1&gt;Build started 6/02/2013 3:30:06 PM.</div><div>1&gt;RestorePackages:</div><div>1&gt; &nbsp;"C:\Development\Torpedo.Geo\.nuget\nuget.exe" install "C:\Development\Torpedo.Geo\Torpedo.Geo.Model\packages.config" -source "" &nbsp;-RequireConsent -solutionDir "C:\Development\Torpedo.Geo\ "</div><div>1&gt; &nbsp;All packages listed in packages.config are already installed.</div><div>1&gt;PostSharp21InspectReferences:</div><div>1&gt; &nbsp;Detected reference to 'PostSharp'.</div><div>1&gt;GenerateTargetFrameworkMonikerAttribute:</div><div>1&gt;Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.</div><div>1&gt;CoreCompile:</div></div><div><br></div><div>I can't see devforce trying to generate the metadata</div><div><br></div><div>I am kind of stuck here. &nbsp;Any suggestions would be&nbsp;appreciated</div><div><br></div><div>thanks</div><div><br>Murray</div><div><br></div><div><br></div><span style="font-size:10px"><br /><br />Edited by murray.bryant - 05-Feb-2013 at 11:31pm</span>]]>
   </description>
   <pubDate>Tue, 05 Feb 2013 23:31:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3980&amp;PID=15808#15808</guid>
  </item> 
 </channel>
</rss>