<?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 : Type conflict</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Type conflict</description>
  <pubDate>Sat, 11 Apr 2026 11:37:19 -700</pubDate>
  <lastBuildDate>Tue, 11 Aug 2009 09:29:03 -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=1400</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>Type conflict : I&amp;#039;ve solved this one quite...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5146#5146</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=472" rel="nofollow">Sinnema</a><br /><strong>Subject:</strong> 1400<br /><strong>Posted:</strong> 11-Aug-2009 at 9:29am<br /><br />I've solved this one quite simpeler than SkinGabi suggested. Here's our solution:<DIV>&nbsp;</DIV><DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>using</FONT></FONT><FONT size=2> Diartis.KLIB.DomainModel;</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>namespace</FONT></FONT><FONT size=2> Diartis.KLIB.KLIBDatabase</P><P>{</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>static</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>class</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>ModelContext</P></FONT></FONT><FONT size=2><P>{</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>private</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>static</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>KLIBEntityManager</FONT></FONT><FONT size=2> m_KLIBEntityManager = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>;</P><P></FONT><FONT color=#808080 size=2><FONT color=#808080 size=2>///</FONT></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2> </FONT></FONT><FONT color=#808080 size=2><FONT color=#808080 size=2>&lt;summary&gt;</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#808080 size=2><FONT color=#808080 size=2>///</FONT></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2> This is the main manager for DevForce. It is a singleton pattern that creates a new KLIB Entity Manager</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#808080 size=2><FONT color=#808080 size=2>///</FONT></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2> </FONT></FONT><FONT color=#808080 size=2><FONT color=#808080 size=2>&lt;/summary&gt;</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>static</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>KLIBEntityManager</FONT></FONT><FONT size=2> DefaultManager</P><P>{</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>get</P></FONT></FONT><FONT size=2><P>{</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (m_KLIBEntityManager == </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>)</P><P>{</P><P>m_KLIBEntityManager = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>KLIBEntityManager</FONT></FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>true</FONT></FONT><FONT size=2>);</P><P>}</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2> m_KLIBEntityManager;</P><P>}</P><P>}</P><P>}</P><P>}</P></FONT></DIV>]]>
   </description>
   <pubDate>Tue, 11 Aug 2009 09:29:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5146#5146</guid>
  </item> 
  <item>
   <title>Type conflict : Thanks for the info. I&amp;#039;ll...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5097#5097</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=472" rel="nofollow">Sinnema</a><br /><strong>Subject:</strong> 1400<br /><strong>Posted:</strong> 03-Aug-2009 at 3:06am<br /><br /><P>Thanks for the info. I'll try it this week.</P><DIV>regards,</DIV><DIV>Paul Sinnema</DIV>]]>
   </description>
   <pubDate>Mon, 03 Aug 2009 03:06:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5097#5097</guid>
  </item> 
  <item>
   <title>Type conflict : The DefaultManager property will...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5077#5077</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=308" rel="nofollow">skingaby</a><br /><strong>Subject:</strong> 1400<br /><strong>Posted:</strong> 30-Jul-2009 at 12:26pm<br /><br />The DefaultManager property will automatically create an EntityManager, which you don't want.  You will need to create a DomainModelEntityManager and use that.  For the server-side, this can be handled in the global.asax:<br /><br /><table width="99%"><tr><td><pre class="BBcode">protected void Application_Start(Object sender, EventArgs e)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IdeaBlade.Core.IdeaBladeConfig.AssertNonDefaultVersion();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ConfigureEntityManager();<br />}<br /><br />private void ConfigureEntityManager()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DomainModel.Utility.LocalEntityManager.DefaultManager = new DomainModel.DomainModelEntityManager();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DomainModel.Utility.LocalEntityManager.DefaultManager.LoginAsync(null, args =&gt; LoginCallback(args, null), null);<br />}<br /><br />private void LoginCallback(IdeaBlade.EntityModel.LoginEventArgs args, Action callback)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (args.Error != null)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw args.Error;<br />}</pre></td></tr></table><br /><br />For the client-side, in a Silverlight App, the Prism Explorer shows this being initialized in each module's PersistenceService by overriding the CreateEntityManagerCore() method.<br /><table width="99%"><tr><td><pre class="BBcode">protected override IdeaBlade.EntityModel.EntityManager CreateEntityManagerCore()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var em = new DomainModelEntityManager();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LocalEntityManager.DefaultManager = em;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var task = AsyncSerialTask.Create();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var task1 = task.AddAsyncLogin(em, new LoginCredential(null, null, null));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;task1.AddExceptionHandler(CreateEntityManagerCoreAsyncSerialTaskExceptionHandler);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var task2 = task1.AddAsyncAction&lt;AsyncEventArgs&gt;((loginEventArgs, callback) =&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LocalEntityManager.InitializeCacheAsync(callback, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tools.AsyncSerialTaskParallelCallback));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;task2.AddExceptionHandler(CreateEntityManagerCoreAsyncSerialTaskExceptionHandler);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;task2.Execute(null, args =&gt; CreateEntityManagerCoreCallback(args));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return em;<br />}<br /><br />public void CreateEntityManagerCoreCallback(AsyncSerialTaskCompletedArgs&lt;AsyncEventArgs&gt; args)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//TODO:  Do something cool here.  Like raise an event back to the VM to tell it we're done initializing the EM/cache.<br />}<br /><br />public static void CreateEntityManagerCoreAsyncSerialTaskExceptionHandler(AsyncSerialTaskExceptionArgs args)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//TODO:  This should do something much wiser, like<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//log the error and set an "Error" property<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw args.Exception;<br />}</pre></td></tr></table><br /><br />In the above code, you'll notice the LocalEntityManager.DefaultManager.  LocalEntityManager is a class we are using to make the EntityManager available to all our domain classes, and it looks like this:<br /><table width="99%"><tr><td><pre class="BBcode">public static class LocalEntityManager<br />{<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static DomainModelEntityManager _defaultManager;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static DomainModelEntityManager DefaultManager<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;get<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _defaultManager;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_defaultManager = value;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_defaultManager.Saving += new EventHandler&lt;IdeaBlade.EntityModel.EntitySavingEventArgs&gt;(_defaultManager_Saving);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void _defaultManager_Saving(object sender, IdeaBlade.EntityModel.EntitySavingEventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VerifierResultCollection allResults = new VerifierResultCollection();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (Entity item in e.Entities)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var itemResults = ((BaseEntity)item).VerifyInstance();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (var result in itemResults) { allResults.Add(result); }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!allResults.AreOk)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.Cancel = true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VerifierResults = allResults;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;string msg = String.Empty;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (var result in allResults)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (result.IsError)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!String.IsNullOrEmpty(msg))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msg += ", ";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msg += result.Description;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw new VerifierException("Verifier Failure: " + msg);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static VerifierResultCollection VerifierResults { get; set; }<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#region InitializeCache<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void InitializeCache()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var queries = GetInitializationQueries();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (var item in queries)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_defaultManager.ExecuteQuery(item);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// &lt;summary&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// Initialize the EntityManager cache asynchronously.  This method should be used <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// instead of the InitializeCacheAsync(AsyncCompletedCallback&lt;AsyncEventArgs&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// serialCallback, Action&lt;AsyncParallelTaskCompletedArgs&gt; completionAction) version.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// That one was created to make the Initialize work as part of an AsyncSerialTask.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// &lt;/summary&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// &lt;param name="completionAction"&gt;The Action to execute (call back to) to return <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// the results of this async call.&lt;/param&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void InitializeCacheAsync(Action&lt;AsyncParallelTaskCompletedArgs&gt; completionAction)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InitializeCacheAsync(null, completionAction);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// &lt;summary&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// Initialize the EntityManager cache asynchronously.  This method can be called <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// inside an AsyncSerialTask because it carries the AsyncSerialTask's callback <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// through it.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// &lt;/summary&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// &lt;param name="serialCallback"&gt;The callback to pass through so the Parallel<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// completionAction can assemble an AsyncEventArgs toss it over to the Serial <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// serialCallback.&lt;/param&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// &lt;param name="completionAction"&gt;The Action to execute (call back to) to <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/// return the results of this async call.&lt;/param&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void InitializeCacheAsync(AsyncCompletedCallback&lt;AsyncEventArgs&gt; serialCallback, Action&lt;AsyncParallelTaskCompletedArgs&gt; completionAction)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var task = AsyncParallelTask.Create();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;task.AddExceptionHandler(InitializationExceptionHandler);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AddInitializationQueries(task);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;task.Execute(serialCallback, completionAction);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static void AddInitializationQueries(AsyncParallelTask&lt;object&gt; task)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var queries = GetInitializationQueries();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int i = 1;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (var item in queries)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IEntityQuery query = item;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;task.AddAsyncAction&lt;EntityFetchedEventArgs&gt;(i, (args, callback) =&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_defaultManager.ExecuteQueryAsync(query, callback, null), null);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i++;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static IList&lt;IEntityQuery&gt; GetInitializationQueries()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var queries = new List&lt;IEntityQuery&gt;();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queries.Add(_defaultManager.AccountingMonths);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queries.Add(_defaultManager.DealTypes);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return queries;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void InitializationExceptionHandler(AsyncParallelTaskExceptionArgs args)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw args.Exception;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#endregion<br /><br />}</pre></td></tr></table>]]>
   </description>
   <pubDate>Thu, 30 Jul 2009 12:26:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5077#5077</guid>
  </item> 
  <item>
   <title>Type conflict : Hi Greg,  Thanks for the reply.  Whell...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5076#5076</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=472" rel="nofollow">Sinnema</a><br /><strong>Subject:</strong> 1400<br /><strong>Posted:</strong> 30-Jul-2009 at 11:10am<br /><br />Hi Greg,<DIV>&nbsp;</DIV><DIV>Thanks for the reply.</DIV><DIV>&nbsp;</DIV><DIV>Whell I can tell you we're not instantiating any EntityManager ourselves anywhere in the code. We use the DefaultManager solely (at the moment). So far we do not intend to do otherwise, but one can never say 'never' for sure.</DIV><DIV>&nbsp;</DIV><DIV>Having said that,&nbsp;it seems peculiar what happens here. We could deduce that the server somehow launches a different flavor of the EntityManager, causing the Type conflict. But I would like to hear from you what you think is going on.</DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>Paul Sinnema</DIV><DIV>Diartis AG</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 30 Jul 2009 11:10:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5076#5076</guid>
  </item> 
  <item>
   <title>Type conflict : The Object Mapper generates a...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5074#5074</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1400<br /><strong>Posted:</strong> 30-Jul-2009 at 10:27am<br /><br />The Object Mapper generates a subclassed EntityManager, named DomainModelEntityManager by default. The subclassed EntityManager includes methods that return queries specific to your domain model, etc.<br><br>Whatever flavor of EntityManager you instantiate first (subclassed or otherwise) becomes the one assigned to DefaultManager. Thus, if you instantiate an EntityManager at startup:<br><br>&nbsp;&nbsp;&nbsp; EntityManager foo = new EntityManager();<br><br>that becomes the DefaultManager. Then if you later try to do something that needs the DefaultManager to be the subclassed version (DomainModelEntityManager), you'll get a type conflict.&nbsp; Very likely you've got something like that going on.<br>]]>
   </description>
   <pubDate>Thu, 30 Jul 2009 10:27:39 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5074#5074</guid>
  </item> 
  <item>
   <title>Type conflict : Hi,  Our development, at this...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5054#5054</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=472" rel="nofollow">Sinnema</a><br /><strong>Subject:</strong> 1400<br /><strong>Posted:</strong> 29-Jul-2009 at 9:23am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Our development, at this moment, is realy going well. DevForce Winclient is in development a real pleasure to work with.</DIV><DIV>&nbsp;</DIV><DIV>Today we had to&nbsp;deploy our first result and we ran into a snag. We don't understand the message we're getting.</DIV><DIV>&nbsp;</DIV><DIV>We tried to deploy a client and server using the N-Tier Configuration Starter tool. The tool work fine (I think) but the result was not satisfying. The server starts without problems but the Client get's an error:</DIV><BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr><DIV>Type conflict:&nbsp; the DefaultManager is currently of type EntityManager</DIV></BLOCKQUOTE><DIV dir=ltr>Who can tell us what this means?</DIV><DIV dir=ltr>&nbsp;</DIV><DIV dir=ltr>Regards,</DIV><DIV dir=ltr>Paul Sinnema</DIV><DIV dir=ltr>Diartis AG</DIV>]]>
   </description>
   <pubDate>Wed, 29 Jul 2009 09:23:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1400&amp;PID=5054#5054</guid>
  </item> 
 </channel>
</rss>