Telerik Forums RSShttp://www.telerik.com/urn:uuid:970abb8e-a598-4484-ab24-d536b7b3ad5bhttp://www.telerik.com/forums/permalink/jrsKl5ilhESrJNU2t7OtWwLINQ TO SQLHello Sathish,<br />
<br />
The type of result an OpenAccess Linq query is returning is <strong>IObjectScopeQuery&lt;T&gt;</strong>, which implements <strong>IQueriable&lt;T&gt;</strong> so you can use both of them.<br />
<br />
When a query like the one you asked for in your previous ticket executes, an SQL similar to <span id="ctl11_repeaterMessages_ctl00_lblMessageText" class="text">"SELECT * FROM Customers WHERE ID &gt; 100" is generated and only the desired result are returned.</span> Not all objects are loaded in memory.<br />
<br />
If you require any other information regarding OpenAccess please do not hesitate to contact us again.<br />
<br />
Kind regards,<br />
Zoran <br />
the Telerik team
<div style="font-size: 10px;"><br />
Instantly find answers to your questions on the new <a href="http://www.telerik.com/support" style="color: gray;" target="_blank">Telerik Support Portal</a>.<br />
<a href="http://blogs.telerik.com/supportdept/posts/08-12-22/New_support_resources_search_facilities_on_telerik_com.aspx" style="color: gray;" target="_blank">Check out the tips</a> for optimizing your support resource searches.</div>
urn:uuid:90ef1002-9608-48ee-9685-d9f1afdeadc8http://www.telerik.com/forums/permalink/AhDvkAiW7kiWhdnxr96tyALINQ TO SQLHi,<br />
<br />
When I am writing a LINQ To OpenAccess query, what is the type of the object I am writing to? Is it Iqueryable.<br />
<br />
If I write<br />
<br />
Dim myQuery as IQuery (&lt;-- IS THIS CORRECT? Should I use IQuery or Iqueryable?)<br />
<br />
myQuery = From row in os.Extent(Of Customer) WHERE ID &gt; 100<br />
<br />
Does it translate into SQL query of "SELECT * FROM Customers WHERE ID &gt; 100"<br />
or does it download the whole of customers table into memory and do a LINQ to Entities (i.e. loop through the data and return the result)<br />
<br />
I do not see as much performance as I should. Could you please confirm.<br />
<br />
Thank you.
urn:uuid:60f980b0-6228-44f2-bd04-9319b5007165http://www.telerik.com/forums/permalink/sID5YChi8kS9BJMZtQBxZQLINQ TO SQLHi Sathish,<br />
<br />
Thank you for your continuous feedback.<br />
<br />
Please review the following resources for more information about Fetch Plans<br />
<ul>
<li><a href="http://www.telerik.com/help/openaccess-orm/fetchplans.html">Fetch Plans Introduction</a></li>
<li><a href="http://www.telerik.com/support/kb/orm/general/fetch-groups.aspx">KB: Using Fetch Plans</a></li>
<li><a href="http://www.telerik.com/help/openaccess-orm/firststeps-example-%28cs%29-step7.html">Fetch Plans First Step Example</a></li>
<li><a href="http://www.telerik.com/help/openaccess-orm/fetch-plans.html">Fetch Plan Browser Documentation</a></li>
</ul>
<br />
Please see also the documentation for <a href="http://www.telerik.com/help/openaccess-orm/fetch-groups.html">Fetch Groups</a> and related<br />
<ul>
<li><a href="http://www.telerik.com/help/openaccess-orm/mapping-properties-fetch-groups.html">Mapping Properties</a></li>
</ul>
<ul>
<li><a href="http://www.telerik.com/help/openaccess-orm/field-attributes-defaultfetchgroup.html">Default Fetch Group</a></li>
<li><a href="http://www.telerik.com/help/openaccess-orm/field-attributes-fetchfield.html">Fetch Field Attribute</a></li>
<li><a href="http://www.telerik.com/help/openaccess-orm/field-attributes-fetchgroup.html">Fetch Group Attribute</a></li>
</ul>
<br />
Last not least, you can also check an <a href="http://www.telerik.com/community/code-library/orm/general/openaccess-web-integration.aspx">example project</a> from our code library using Fetch Plans.<br />
<br />
Concerning bug reports, please download the most current <a href="http://www.telerik.com/downloads.aspx?fileid=9234&amp;dispkey=True">trial version</a> of OpenAccess and create a <a href="http://www.telerik.com/account/support-tickets/bug-report-choose-product.aspx">bug report</a> ticket.<br />
<br />
Thanks for your contributions.<br />
<br />
All the best,<br />
Peter Brunner <br />
the Telerik team
<div style="font-size: 10px;"><br />
Instantly find answers to your questions on the new <a target="_blank" style="color: gray;" href="http://www.telerik.com/support">Telerik Support Portal</a>.<br />
<a target="_blank" style="color: gray;" href="http://blogs.telerik.com/supportdept/posts/08-12-22/New_support_resources_search_facilities_on_telerik_com.aspx">Check out the tips</a> for optimizing your support resource searches.</div>
urn:uuid:f4745aee-8f11-4335-9466-0316385d0415http://www.telerik.com/forums/permalink/7lp09BGPNUOUZgMWOF0EFQLINQ TO SQLThank you very much for the reply. I just wanted to confirm that, because I will be quering a table with more than 100,000 records and I certainly do not want to download the whole table.<br />
<br />
I have another question,<br />
<br />
Where can I find a step by step tutorial about fetch plans, from the basics to advanced.<br />
<br />
Also, there are few bugs that I have come across in OA. Can I report them in forum here?<br />
urn:uuid:2f6e4676-d64c-451f-aafa-ca1f7a24b22fhttp://www.telerik.com/forums/permalink/dkZuL0zWH0Wq-sofeiSyLwLINQ TO SQLHi Sathish,<br />
We try to push as much as possible of your query to the server. In your case SELECT * FROM customers where row.id &gt; 100 will be generated. If that is not possible we inform you during compilation or runtime about the non-optimal query execution.<br />
<br />
Regards,<br />
Jan Blessenohl <br />
the Telerik team
<div style="font-size: 10px;"><br />
Instantly find answers to your questions on the new <a href="http://www.telerik.com/support" style="color: gray;" target="_blank">Telerik Support Portal</a>.<br />
<a href="http://blogs.telerik.com/supportdept/posts/08-12-22/New_support_resources_search_facilities_on_telerik_com.aspx" style="color: gray;" target="_blank">Check out the tips</a> for optimizing your support resource searches.</div>
urn:uuid:e0da7d79-f7fe-4706-8622-857a93e5b970http://www.telerik.com/forums/permalink/eX3a4P73BkeGIoV6k-W5cALINQ TO SQLHi,<br />
<br />
Thank you for the response. I understand that aspect of it, my question is more data related. So, If I have a linq statement such as <br />
<br />
query = from row in scope.extent&lt;customers&gt; _<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where row.id &gt; 100<br />
<br />
does this download the whole table data and then run the where condition against it? or does it generate "SELECT * FROM customers where row.id &gt; 100"<br />
<br />
I dont want all the data to be download. I want it to convert my conditions to sql and exract only those data. does ORM support that?
urn:uuid:586cfb93-1800-4e9d-b1f1-5d0537a723aahttp://www.telerik.com/forums/permalink/k_tsWAAYnU6x8V0FN6cjqgLINQ TO SQLHello Sathish,<br />
LINQ to SQL is speciffic LINQ dialect implemented by ty the L2S runtime. What we provide is LINQ to OpenAccess - you can run LINQ queries against the OpenAccess runtime. The only speciffic thing is that you use the scope instead of L2S datacontext, and the Extent extension method to get the entity sets, example:<br />
L2S: context.GetCustomers() returns all customer entities<br />
<br />
OpenAccess: context.Extent&lt;Customer&gt;() returns all customer entities.<br />
<br />
The differences are very small as in both cases it is LINQ notation.<br />
<br />
<br />
<br />
Sincerely yours,<br />
Dimitar Kapitanov <br />
the Telerik team
<div style="font-size: 10px;"><br />
Instantly find answers to your questions on the new <a href="http://www.telerik.com/support" style="color: gray;" target="_blank">Telerik Support Portal</a>.<br />
<a href="http://blogs.telerik.com/supportdept/posts/08-12-22/New_support_resources_search_facilities_on_telerik_com.aspx" style="color: gray;" target="_blank">Check out the tips</a> for optimizing your support resource searches.</div>
urn:uuid:2d7ee0c7-7e4f-48ab-9d31-e214f26d724fhttp://www.telerik.com/forums/permalink/x-B-LU9-q0idMeIU8m1yTwLINQ TO SQLHi,<br />
<br />
How do I write LINQ to SQL queries in OpenAccess? Is it supported?<br />
<br />
query = From row in scope.Extent(of Products)<br />
<br />
Is this linq to entities or linq to sql? I dont want to download all the products from the database.<br />
<br />
I want to write linq to sql queries, how do I do that?