This is a migrated thread and some comments may be shown as answers.

Generated Queries

1 Answer 31 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Grant
Top achievements
Rank 1
Grant asked on 15 Dec 2010, 02:40 PM
I submitted a ticket asking about this, but didn't hear back. So I was hoping maybe someone on the forums could answer.

Watching the generated SQL generated by OpenAccess it appears that prior to filitering, OpenAccess selects every row from a table.

For example, I see queries like this:

SELECT a.[Code] AS COL?, a.[AmountBilledNow] AS COL?, a.[FooterText] AS COL?, a.[FullOrderAmount] AS COL?, a.[LoginPrefix] AS COL?, a.[NeedsLogin] AS COL?, a.[NeedsPIN] AS COL?, a.[SKUCode] AS COL?, a.[SalesFlowKey] AS COL?, a.[ShortSummary] AS COL?, a.[TermsURL] AS COL?, a.[ThemeId] AS COL?, a.[Title] AS COL? FROM [usp_OrderCode] a ORDER BY a.[Code]

Generated when I have a statement like this:

dbContext.OrderCodes.Where(oc => oc.Code == "test_order_code")

When I turn the debug level to "all" I can verify that it has  definitely selected all rows from the table.

Is this normal behavior?

Thanks

1 Answer, 1 is accepted

Sort by
0
Serge
Telerik team
answered on 16 Dec 2010, 02:17 PM
Hello Grant,

 So far we have been unable to reproduce this behaviour on our side. Would you mind continuing the conversation in the support ticket that you have opened.

We will post the solution to the problem in this forum thread once found out.

Greetings,
Serge
the Telerik team
Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
Tags
Development (API, general questions)
Asked by
Grant
Top achievements
Rank 1
Answers by
Serge
Telerik team
Share this question
or