.net core configuration

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
janidbest
Posts: 3
Joined: Mon 20 Nov 2017 05:58

.net core configuration

Post by janidbest » Mon 20 Nov 2017 06:07

I have recently considered the db provider to deal with oracle using efcore.
I can't seem to locate a good samples as yet.
I don't see any configuration related options ? (am I missing it).

If I want to generate the sql in specific to a version targeted is it possible? like 11g support/12c support? as the code first equivalent may be different to each version depending on the features that it supports

How do we turn the NCLOB into nvarchar(2000) in efcore?

Shalex
Devart Team
Posts: 8083
Joined: Thu 14 Aug 2008 12:44

Re: .net core configuration

Post by Shalex » Tue 21 Nov 2017 13:44

janidbest wrote:I have recently considered the db provider to deal with oracle using efcore.
I can't seem to locate a good samples as yet.
I don't see any configuration related options ? (am I missing it).
1. Please refer to:
https://www.devart.com/dotconnect/oracl ... ility.html
https://www.devart.com/dotconnect/oracl ... iderefcore
https://www.devart.com/dotconnect/oracl ... TCore.html
https://www.devart.com/dotconnect/oracl ... -Core.html
janidbest wrote:If I want to generate the sql in specific to a version targeted is it possible? like 11g support/12c support? as the code first equivalent may be different to each version depending on the features that it supports
2. The Devart EF Core provider generates SQL specific to Oracle Server version you are connecting to.
janidbest wrote:How do we turn the NCLOB into nvarchar(2000) in efcore?
3. By default, System.String is mapped to NCLOB. You can change this:

3.1. Via config.CodeFirstOptions.UseNonLobStrings for all properties in a current process:

Code: Select all

var config = Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance;
config.CodeFirstOptions.UseNonLobStrings = true;
3.2. Via attribute ([MaxLength]) or fluent mapping (.HasMaxLength) for particular property.

Post Reply