setting EntityProviderConfig.QueryOptions

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
ratm
Posts: 13
Joined: Thu 14 Feb 2019 11:36

setting EntityProviderConfig.QueryOptions

Post by ratm » Mon 11 Mar 2019 15:47

Hi I would need to set EntityProviderConfig.QueryOptions CaseInsensitiveLike = true. How can I do?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: setting EntityProviderConfig.QueryOptions

Post by Shalex » Wed 13 Mar 2019 16:29

With EF6, you can do that in code or via *.config:

a) in code (for example, in a static constructor of the context)

Code: Select all

            var config = Devart.Data.PostgreSql.Entity.Configuration.PgSqlEntityProviderConfig.Instance;
            config.QueryOptionsCaseInsensitiveLike=true;
b) via *.config

Code: Select all

  <configSections>
    <section name="Devart.Data.PostgreSql.Entity" type="Devart.Data.PostgreSql.Entity.Configuration.PgSqlEntityProviderConfigurationSection, Devart.Data.PostgreSql.Entity.EF6, Version=7.12.1328.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
  </configSections>
  <Devart.Data.PostgreSql.Entity xmlns="http://devart.com/schemas/Devart.Data.PostgreSql.Entity/1.0">
      <QueryOptions CaseInsensitiveLike="true" />
  </Devart.Data.PostgreSql.Entity>
Refer to https://www.devart.com/dotconnect/postg ... tions.html.

ratm
Posts: 13
Joined: Thu 14 Feb 2019 11:36

Re: setting EntityProviderConfig.QueryOptions

Post by ratm » Sat 23 Mar 2019 15:31

80/5000
I can't get it to work on the code in * .config
How can I do?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: setting EntityProviderConfig.QueryOptions

Post by Shalex » Mon 25 Mar 2019 15:38

Please specify:
1) the name of ORM framework you use and its version (e.g.: LinqConnect, Entity Framework 6, Entity Framework Core, etc)
2) the value of Target framework set in the properties of your Visual Studio project

ratm
Posts: 13
Joined: Thu 14 Feb 2019 11:36

Re: setting EntityProviderConfig.QueryOptions

Post by ratm » Tue 26 Mar 2019 16:33

Freamwork .NET 4.5 and use LinqConnection

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: setting EntityProviderConfig.QueryOptions

Post by Shalex » Thu 28 Mar 2019 13:22

Devart.Data.PostgreSql.Entity.Configuration.PgSqlEntityProviderConfig works with Entity Framework (not LinqConnect).

Refer to viewtopic.php?f=3&t=38492.

Post Reply