Page 1 of 1

.net core configuration

Posted: Mon 20 Nov 2017 06:07
by janidbest
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?

Re: .net core configuration

Posted: Tue 21 Nov 2017 13:44
by Shalex
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.