Could EntityFramework provider generate parameterized query?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
sip
Posts: 2
Joined: Thu 28 Apr 2011 04:09

Could EntityFramework provider generate parameterized query?

Post by sip » Thu 28 Apr 2011 04:24

Are there any configuration options for Entity Framework provider to customize query generation? Example: for my details queries I'm getting fully defined query in both Prepare/Execute steps (I'm using dbMonitor)

SELECT "GroupBy1".A1 AS C1
FROM ( SELECT Count(1) AS A1
FROM SW_MAIN_DEV.AGENCY_PHONE "Extent1"
WHERE "Extent1".AGENCY_ID = 528
) "GroupBy1"

I want to get query like this in Prepare step:

SELECT "GroupBy1".A1 AS C1
FROM ( SELECT Count(1) AS A1
FROM SW_MAIN_DEV.AGENCY_PHONE "Extent1"
WHERE "Extent1".AGENCY_ID = :pAgencyId
) "GroupBy1"

with the following parameter value substitution on Execute.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 28 Apr 2011 12:48

If you are using LINQ to Entities, it is enough to create a variable in your code instead of using a constant in the LINQ query Where clause.

sip
Posts: 2
Joined: Thu 28 Apr 2011 04:09

Post by sip » Thu 28 Apr 2011 18:37

As I said I'm using EntityFramework and RIA Services. I cannot control how Linq queries are constructed, because it's done automatically by DomainDataSource component. That why I'm asking how sql generated by DevArt EF provider can be customized. Actually it's very important for me, because we have a pretty strict policy in our company regarding what kind of query could be run on Oracle. But I definitely don't want to skip using DomainDataSource, because it improves speed of development.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 29 Apr 2011 13:56

We have added a suggestion on our Entity Framework support UserVoice.
Please vote for this and other suggestions, we appreciate feedback provided by our users.

Post Reply