[EFCore] Different UseNonUnicodeStrings settings within one application

[EFCore] Different UseNonUnicodeStrings settings within one application

Postby azabluda » Fri 06 Jan 2017 15:46

There exists an option
Code: Select all
which controls the default database column type used for string properties (when no .HasColumnType is explicitly specified in the model builder).

The fact that OracleEntityProviderConfig is a singleton makes it problematic to configure the behavior differently within one application (e.g. when talking to two different databases) or to run some specific automated tests in parallel. UseNonUnicodeStrings flag is just one example, OracleEntityProviderConfig contains many other options which today can only be set globally.

Proposal: add optional parameter
Code: Select all
OracleEntityProviderConfig providerConfig

to DbContextOptionsBuilder.UseOracle (or at least to OracleOptionsExtension class) to make it possible to configure the provider differently for different instances of DbContext (or at least for different service collections). Static OracleEntityProviderConfig.Instance can still be used by default for backward compatibility.
Posts: 34
Joined: Thu 10 Sep 2009 14:45

Re: [EFCore] Different UseNonUnicodeStrings settings within one application

Postby Shalex » Tue 10 Jan 2017 12:10

Thank you for your suggestion. We will put this feature on our roadmap and notify you when it is implemented.
Devart Team
Posts: 7949
Joined: Thu 14 Aug 2008 12:44

Return to dotConnect for Oracle