.net core configuration

.net core configuration

Postby 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?
janidbest
 
Posts: 2
Joined: Mon 20 Nov 2017 05:58

Re: .net core configuration

Postby 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/oracle/docs/?NET-Standard-Compatibility.html
https://www.devart.com/dotconnect/oracle/docs/EF.html#dataproviderefcore
https://www.devart.com/dotconnect/oracle/docs/?Tutorial_EFCore_NETCore.html
https://www.devart.com/dotconnect/oracle/docs/?EFCore-Database-First-NET-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.
Shalex
Devart Team
 
Posts: 7833
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle