<?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 : Question about DB relations in entity manager</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Question about DB relations in entity manager</description>
  <pubDate>Tue, 14 Apr 2026 06:30:41 -700</pubDate>
  <lastBuildDate>Thu, 01 Jul 2010 16:26: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=1920</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>Question about DB relations in entity manager : You can make synchronous queries,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1920&amp;PID=7486#7486</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> 1920<br /><strong>Posted:</strong> 01-Jul-2010 at 4:26pm<br /><br />You can make synchronous queries, but they just use whatever's in the local cache. That turns out to be a nice feature, though, since in some situations you can just pre-load all the data your user needs to work with and do everything synchronously.<br /><br />As for your TestEntities class, if you linked it into your Silverlight project then it's compiled into that assembly and is just like any other local class.]]>
   </description>
   <pubDate>Thu, 01 Jul 2010 16:26:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1920&amp;PID=7486#7486</guid>
  </item> 
  <item>
   <title>Question about DB relations in entity manager : Yes, thats wonderful, But I&amp;#039;m...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1920&amp;PID=7479#7479</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=801" rel="nofollow">ehsan</a><br /><strong>Subject:</strong> 1920<br /><strong>Posted:</strong> 01-Jul-2010 at 4:32am<br /><br /><P>Yes, thats wonderful, But I'm currently use that in silverlight !</P><DIV>&amp; also I can call server methods synchronously &amp; I don't know why !</DIV><DIV>&nbsp;</DIV><DIV>for example I've this partial class :</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><P>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>partial</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>class</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>TestEntities</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas>&nbsp;</FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#000000> {</P><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><P>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>int</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> add(</FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>int</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> a, </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>int</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> b)</P><P>{</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp;&nbsp; return</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> a + b;</P><P>}</FONT></FONT></P></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV>}</DIV><DIV>&nbsp;</DIV><DIV>Although I didn't mark add method with <FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#091;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>AllowRpc</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#093; &amp; that's not static, but i can call it directly &amp; synchronously&nbsp;from silverlight client !!! (I just added a link from server side partial class to my silverlight client) &amp; then&nbsp;:</FONT></FONT></DIV><DIV><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><P>TestEntities</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.DefaultManager<FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.add(1, 2);<FONT color=#008000 size=2 face=C&#111;nsolas><FONT color=#008000 size=2 face=C&#111;nsolas><FONT color=#008000 size=2 face=C&#111;nsolas>//It executes successfully &amp; synchronously &amp; returns the correct result !</FONT></FONT></FONT></P><DIV>&nbsp;At first&nbsp;I&nbsp;thought that's a&nbsp;devforce feature, but it's also said in devforce documents that all silverlight calls must be async !</DIV><DIV>&nbsp;</DIV><DIV>what do you think ?</FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></DIV></DIV></DIV><span style="font-size:10px"><br /><br />Edited by ehsan - 01-Jul-2010 at 4:33am</span>]]>
   </description>
   <pubDate>Thu, 01 Jul 2010 04:32:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1920&amp;PID=7479#7479</guid>
  </item> 
  <item>
   <title>Question about DB relations in entity manager : You can get an instance t1Instance...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1920&amp;PID=7471#7471</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> 1920<br /><strong>Posted:</strong> 30-Jun-2010 at 1:54pm<br /><br />You can get an instance t1Instance of t1 with id=X, then just reference<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;t1Instance.t2s<br /><br />or you can do it in one pass using<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;mgr.t1s.Where(r=&gt;r.id == X).Include("t2s")<br /><br />Of course all data retrievals are asynchronous in Silverlight.<br /><br />I can't get a statement of the form you used:<br /><br />&nbsp;&nbsp;&nbsp;RelatedEntityList&lt;t2&gt; list = from r in mgr.t1s where r.id==X select r.t2s ;<br /><br />even to compile, so I'm wondering how you determined what it returns.]]>
   </description>
   <pubDate>Wed, 30 Jun 2010 13:54:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1920&amp;PID=7471#7471</guid>
  </item> 
  <item>
   <title>Question about DB relations in entity manager : I&amp;#039;ve 3 simple sql tables...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1920&amp;PID=7435#7435</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=801" rel="nofollow">ehsan</a><br /><strong>Subject:</strong> 1920<br /><strong>Posted:</strong> 27-Jun-2010 at 10:41am<br /><br />I've 3 simple sql tables : <P>t1( id int primary key, name char(16) );</P><P>t2( id int primary key, name char(16) );</P><P>t3( id1 int&nbsp;references t1(id), id2 int&nbsp;references t2(id) );</P><DIV></DIV>as&nbsp;you&nbsp;see, t3 is a&nbsp;N-to-N relation between t1 &amp; t2. I added this tables to my data model &amp; using entity manager I can query t1 &amp; t2. <DIV>&nbsp;</DIV><DIV>If&nbsp;I want to access related records between t1 &amp; t2,&nbsp;I use something like this (here I get all records from t2 which are in relation with t1 using a record with id=X)&nbsp;:</DIV><DIV>&nbsp;</DIV><DIV>RelatedEntityList&lt;t2&gt; list = from r in mgr.t1s where&nbsp;r.id==X select r.t2s ;</DIV><DIV>&nbsp;</DIV><DIV>but this linq query returns ALL related records.</DIV><DIV>I want to know is there any way to get only a subset of this list from the server (instead of retrieving all of them)&nbsp;?</DIV><DIV>I need it because a record in t1 table&nbsp;may be in a relation with MANY! records of t2 &amp; vice versa (for instance, suppose a 1 to 1000 relation)</DIV><span style="font-size:10px"><br /><br />Edited by ehsan - 27-Jun-2010 at 10:43am</span>]]>
   </description>
   <pubDate>Sun, 27 Jun 2010 10:41:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1920&amp;PID=7435#7435</guid>
  </item> 
 </channel>
</rss>