<?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 : Consolidating models?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Consolidating models?</description>
  <pubDate>Thu, 23 May 2013 14:03:35 -700</pubDate>
  <lastBuildDate>Mon, 21 Mar 2011 10:58:05 -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=2546</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>Consolidating models? : Btw, thank you for the eye opening!...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10233#10233</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2546<br /><strong>Posted:</strong> 21-Mar-2011 at 10:58am<br /><br />Btw, thank you for the eye opening! I have now been able to change things greatly for the better.]]>
   </description>
   <pubDate>Mon, 21 Mar 2011 10:58:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10233#10233</guid>
  </item> 
  <item>
   <title>Consolidating models? : &amp;#034;Would Deal need a reference...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10149#10149</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2546<br /><strong>Posted:</strong> 10-Mar-2011 at 4:23pm<br /><br />"<span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">Would Deal need a reference to Common to be able to query "Common" related entities&nbsp;using the DealEntityManager? Or is that simply up to the hosting application to have both references or do they have to be in same namespace or assembly?"</span><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br></span></div><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">Yes, you still need the reference but they don't have to be in the same namespace or assembly.</span></div><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><br></span></div><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">"</span><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">Can multiple models in the same assembly have different namespaces or do I need to keep them in seperate assemblies for that?"</span></div><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br></span></div><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">Yes, multiple models in the same assembly can have different namespaces.</span></div>]]>
   </description>
   <pubDate>Thu, 10 Mar 2011 16:23:58 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10149#10149</guid>
  </item> 
  <item>
   <title>Consolidating models? : Well that changes the light I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10142#10142</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2546<br /><strong>Posted:</strong> 10-Mar-2011 at 4:15am<br /><br />Well that changes the light I am looking under. <DIV>&nbsp;</DIV><DIV>So in my Domain example, Deal and Common are in seperate assemblies and namespaces. Would Deal need a reference to Common to be able to query "Common" related entities&nbsp;using the DealEntityManager? Or is that simply up to the hosting application to have both references or do they have to be in same namespace or assembly?</DIV><DIV>&nbsp;</DIV><DIV>-Can multiple models in the same assembly have different namespaces or do I need to keep them in seperate assemblies for that? I am asking because as I said there is overlap in the models and that is to keep entities as slim as possible for each module - if we only need 2 fields on an entity in one module vs needing all the fields in another module. Every second counts and this stuff (Silverlight + EF + IB) leaves a lot to be desired in that department.</DIV><DIV>&nbsp;</DIV><DIV>Another reason we have seperate assemblies is to keep testing to a minimum for deployments, if its all in one and anyone&nbsp; touches that one...we have to test the whole system and not just unit test.</DIV><DIV>&nbsp;</DIV><DIV>Thoughts?</DIV>]]>
   </description>
   <pubDate>Thu, 10 Mar 2011 04:15:36 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10142#10142</guid>
  </item> 
  <item>
   <title>Consolidating models? : Hi midnit;Thanks for the screenshot.1....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10139#10139</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2546<br /><strong>Posted:</strong> 09-Mar-2011 at 2:37pm<br /><br />Hi midnit;<div><br></div><div>Thanks for the screenshot.</div><div><br></div><div>1. Your very first post seems to indicate that you're assuming each model needs its own sub-typed EM. That is actually not true. Any EM, sub-typed or not, can access any model within the same assembly. We generate the sub-typed EM to make it easy to use in terms of queries. Using your DomainModel as an example, you can easily access your Common model from Confirmation EM by using:</div><div><br></div><div>var mgr = new ConfirmationEntities();</div><div>mgr.GetQuery&lt;CommonEntity&gt;().ExecuteAsync();</div><div><br></div><div>whereas using the Common EM, you would probably query as follows:</div><div><br></div><div>var mgr = new CommonEntities();</div><div>mgr.CommonEntities.ExecuteAsync();</div><div><br></div><div>Even using a generic EM would work:</div><div><br></div><div>var mgr = new EntityManager();</div><div>mgr.GetQuery&lt;CommonEntity&gt;().ExecuteAsync();</div><div>mgr.GetQuery&lt;ConfirmationEntity&gt;().ExecuteAsync();</div><div><br></div><div>As you can see, the only difference is cleaner syntax.&nbsp;Having multiple EMs or just 1 EMs would not make any difference in this regard.</div><div><br></div><div>2. Your second post about the SecAppUser error seems to indicate that the type is defined under 2 different namespaces within the same assembly. This issue has been fixed in 6.0.8.</div><div><br></div><div>I hope I've understood and answered your questions and assumptions correctly. But if not, please feel free to clarify further.</div>]]>
   </description>
   <pubDate>Wed, 09 Mar 2011 14:37:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10139#10139</guid>
  </item> 
  <item>
   <title>Consolidating models? : Sure thing    The UI are the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10137#10137</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2546<br /><strong>Posted:</strong> 08-Mar-2011 at 11:17pm<br /><br />Sure thing <DIV>&nbsp;</DIV><DIV><img src="http://www.ideablade.com/forum/uploads/531/soluti&#111;n_ss.png" height="748" width="402" border="0" /></DIV><DIV>The UI are the SL host, the *Management are the actual modules. The Models pretty much match up to the modules as the names suggest. SnapShots are old and will be removed. So every module (*Management) references the Common model (highlighted) as well as its specific model. There is a little overlap in some of the models. We are considering moving everything into one model but performance is very high priority so that has to be tested.</DIV><DIV>&nbsp;</DIV><DIV>Does that give you the picture?</DIV>]]>
   </description>
   <pubDate>Tue, 08 Mar 2011 23:17:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10137#10137</guid>
  </item> 
  <item>
   <title>Consolidating models? : Hi midnit;Could you post a screenshot...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10136#10136</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2546<br /><strong>Posted:</strong> 08-Mar-2011 at 7:22pm<br /><br />Hi midnit;<div><br></div><div>Could you post a screenshot or something like the following so I can visualize your current solution's structure better and the structure you're trying to accomplish ?</div><div><br></div><div>Solution<br>&nbsp; CommonModel (Windows Class Library)<br>&nbsp; CustomerModel (Windows Class Library)<br>&nbsp; EmployeeModel (Windows Class Library)<br>&nbsp; OrderModel (Windows Class Library)<br><br>&nbsp;&nbsp;SampleMultipleModels (SL Client&nbsp;Project)<br>&nbsp; SampleMultipleModelsWeb (SL&nbsp;Web Project)<br>&nbsp;&nbsp;&nbsp;&nbsp; Reference to CommonModel, CustomerModel, EmployeeModel, OrderModel<br>&nbsp;&nbsp;&nbsp;&nbsp; LoginManager.cs<br>&nbsp;&nbsp;&nbsp;&nbsp; Employee.cs<br></div><div>&nbsp;&nbsp; &nbsp; ....etc</div>]]>
   </description>
   <pubDate>Tue, 08 Mar 2011 19:22:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10136#10136</guid>
  </item> 
  <item>
   <title>Consolidating models? : I got to a different error now   Caught...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10130#10130</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2546<br /><strong>Posted:</strong> 08-Mar-2011 at 8:27am<br /><br />I got to a different error now<DIV><table width="99%"><tr><td class="BBquote"></DIV><DIV>Caught exception: System.ArgumentException: Png.GcsAg.Model.Deal.SecAppUser must inherit from Entity and does not. at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.HandleException(Exception e, PersistenceFailure failureType) at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.OnExecuteQuery() at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.Execute(IEntityQuery entityQuery, SessionBundle sessionBundle, IEntityServer entityServer) at IdeaBlade.EntityModel.Server.EntityServer.Fetch(SessionBundle sessionBundle, IEntityQuerySurrogate surrogate) at SyncInvokeFetch(Object , Object&#091;&#093; , Object&#091;&#093; ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object&#091;&#093; inputs, Object&#091;&#093;&amp; outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</DIV><DIV></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>Which seems to further suggest that my partials aren't matching up. This happens on both of the entities that are defined in the common.edmx. They have the same injected class as the other model in the project.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 08 Mar 2011 08:27:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10130#10130</guid>
  </item> 
  <item>
   <title>Consolidating models? : We have several models, each with...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10127#10127</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2546<br /><strong>Posted:</strong> 08-Mar-2011 at 6:39am<br /><br />We have several models, each with its own assembly. One of these is a Common model which includes stuff each silverlight Module needs. <DIV>&nbsp;</DIV><DIV>I think I would like to be able to include this "Common" model either in the other models, or perhaps there is a better way. I tried moving the common.edmx into one of the other assemblies and I set up the namespace, entitymanagername, datasourcekey, and container to all be the same and generated the files&nbsp;This does compile..but my partials in the server assembly know nothing of some of the entities that came from Common. The silverlight partials see everything.</DIV><DIV>&nbsp;</DIV><DIV>Also, when I query on any of the entities from the "Common" edmx I get an error:</DIV><DIV><table width="99%"><tr><td class="BBquote">Caught exception: System.NullReferenceException: Object reference not set to an instance of an object. at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.HandleException(Exception e, PersistenceFailure failureType) at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.OnExecuteQuery() at IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.Execute(IEntityQuery entityQuery, SessionBundle sessionBundle, IEntityServer entityServer) at IdeaBlade.EntityModel.Server.EntityServer.Fetch(SessionBundle sessionBundle, IEntityQuerySurrogate surrogate) at SyncInvokeFetch(Object , Object&#091;&#093; , Object&#091;&#093; ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object&#091;&#093; inputs, Object&#091;&#093;&amp; outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>This is using 6.0.7.</DIV><DIV>&nbsp;</DIV><DIV>Can you give me some ideas both on this problem and other potential solutions. I want to make it&nbsp;simple for my team and it seemed having it in one EntityManager would be&nbsp;a step in that direction. On the other hand it seems that they will all be under the same namespace this way? I can work with that I guess. I do want the "Common" to be the same across all models/domains. Should I stick with multiple EM's? The items in "Common" are related to security and business rules that pertain to every silverlight module and are never editable at this point (through silverlight).</DIV><DIV>&nbsp;</DIV><DIV>Thank you,</DIV><DIV>&nbsp;</DIV><span style="font-size:10px"><br /><br />Edited by midnit - 08-Mar-2011 at 6:42am</span>]]>
   </description>
   <pubDate>Tue, 08 Mar 2011 06:39:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2546&amp;PID=10127#10127</guid>
  </item> 
 </channel>
</rss>