Search found 70 matches

by PeterUser
Wed 24 Jan 2018 06:57
Forum: dotConnect for Oracle
Topic: Configure DmlOptions.BatchUpdates per context instance
Replies: 14
Views: 4743

Re: Configure DmlOptions.BatchUpdates per context instance

Thanks a lot.

Actually, we started the project using EF Core, but we ran into some bugs and missing features with the Oracle integration there. So we switched to EF 6. So I think we have to develop some workaround.

Thanks for your help so far and please keep us informed if you find something out about the error messages.

Greetings
Peter
by PeterUser
Tue 16 Jan 2018 08:01
Forum: dotConnect for Oracle
Topic: Configure DmlOptions.BatchUpdates per context instance
Replies: 14
Views: 4743

Re: Configure DmlOptions.BatchUpdates per context instance

Hi Alex,

thanks for your reply. Sorry, that I didn't reply earlier.

I already used the ConcurrencyCheck=true option, but that still swallows all helpful Oracle exceptions. Like p.e. the name of the constraint that got violated.

For me it would be great to switch on Batch Updates on a per-query or per-context basis. Is there any chance for a feature like that? Or is this not compatible with the way EF is working internally?

Greetings
Peter
by PeterUser
Wed 20 Dec 2017 14:45
Forum: dotConnect for Oracle
Topic: Configure DmlOptions.BatchUpdates per context instance
Replies: 14
Views: 4743

Configure DmlOptions.BatchUpdates per context instance

Hello

My question is: Can I configure OracleEntityProviderConfig.Instance.DmlOptions.BatchUpdates.Enabled only in the scope of a single query / DbContext instance?

I am using EF6 with dotConnect for Oracle. I will elaborate my scenario a bit in order to provide some context:

I have some larger inserts and update operations in my application, that affect a couple of thousand db entries. For those I see a big performance improvement when using OracleEntityProviderConfig.Instance.DmlOptions.BatchUpdates.Enabled = true.

However, as I do so, I do not see constraint violations or other issues when inserting new entities. DbMonitor reports:

Code: Select all

BEGIN
INSERT INTO SCHEMA.TABLE(C1, C2)
VALUES (:p0, :p1);
INSERT INTO SCHEMA.TABLE(C1, C2)
VALUES (:p2, :p3);
END;

-- -1 row(s) affected.
But states "Completed successfully."

This is Ok for my big insert or update operations, but for all other operations in my application, I would need the exceptions from the database. So is there a way to enable batch operations only for specific queries?

Thanks for any hints or help.
Peter
by PeterUser
Mon 16 Oct 2017 07:07
Forum: dotConnect for Oracle
Topic: OracleFunctions.Like with EF Core
Replies: 2
Views: 3091

OracleFunctions.Like with EF Core

Hi,

I was using

Code: Select all

OracleFunctions.Like
a lot with EF6 for string comparisons. Is there something like that for EF Core?

I tried to reference

Code: Select all

Devart.Data.Oracle.Entity.EF6
and use the old function, but that didn't work.

Greetings
Peter

I use EF Core 1.1.2 with dotConnect for Oracle 9.4.326.
by PeterUser
Mon 16 Oct 2017 06:53
Forum: dotConnect for Oracle
Topic: EFCore - Disabling client evaluation
Replies: 1
Views: 15659

EFCore - Disabling client evaluation

Hi,

I am using EF Core with dotConnect for Oracle as a database provider. I see that many queries are executed in code. The EF Core documentation lists the possibility to configure the provider to throw an exception, when this happens.

Code: Select all

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
    optionsBuilder
        .UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=EFQuerying;Trusted_Connection=True;")
        .ConfigureWarnings(warnings => warnings.Throw(RelationalEventId.QueryClientEvaluationWarning));
}
Is there something like this for the dotConnect for Oracle provider?

It is very cumbersome to check every query by hand.

Greetings
Peter

I use EF Core 1.1.2 with dotConnect for Oracle 9.4.326.
by PeterUser
Wed 29 Mar 2017 14:38
Forum: dotConnect for Oracle
Topic: QueryOptions.NoEscapeLike in combination with StartsWith and ToLower seems broken
Replies: 7
Views: 1859

Re: QueryOptions.NoEscapeLike in combination with StartsWith and ToLower seems broken

Thanks for the suggestion. OracleFunctions.Like is a workaround I cal life with.
by PeterUser
Fri 17 Mar 2017 11:54
Forum: dotConnect for Oracle
Topic: QueryOptions.NoEscapeLike in combination with StartsWith and ToLower seems broken
Replies: 7
Views: 1859

Re: QueryOptions.NoEscapeLike in combination with StartsWith and ToLower seems broken

Hello Alex,

thanks for the information.

Do I understand correctly, that this is something inherent in LinqToSql that cannot be changed by dotconnect for oracle or myself?

Does anybody have an Idea how to circumvent this?

I have to search for in a column of indices that contain underscores ('_'). And I have to use .StartWith.

Do I have to resort to writing explicit SQL?

Greetings
Peter
by PeterUser
Wed 01 Mar 2017 09:04
Forum: dotConnect for Oracle
Topic: QueryOptions.NoEscapeLike in combination with StartsWith and ToLower seems broken
Replies: 7
Views: 1859

Re: QueryOptions.NoEscapeLike in combination with StartsWith and ToLower seems broken

Sorry for mixing that up. You are completely right. 1 b) is the issue I'm facing.

Thanks for your effort.
by PeterUser
Mon 27 Feb 2017 09:18
Forum: dotConnect for Oracle
Topic: QueryOptions.NoEscapeLike in combination with StartsWith and ToLower seems broken
Replies: 7
Views: 1859

QueryOptions.NoEscapeLike in combination with StartsWith and ToLower seems broken

Hello

I have a string property in my model that can contain underscores (_). So I don't want _ treated as an wildcard character in my search. I followed option 1 posted here and set

Code: Select all

var config = Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance;
config.QueryOptions.NoEscapeLike = true;
When I set my filter expression as

Code: Select all

 
expressions.Add(request => request.RequestNo.StartsWith(filter.RequestNo));
I get the SQL code

Code: Select all

WHERE ("Extent1"."RequestNo" LIKE :p__linq__0 ESCAPE '/')
which is exactly what I hoped to get.


The problem comes here:
When I set

Code: Select all

expressions.Add(request => request.RequestNo.ToLower().StartsWith(filter.RequestNo.ToLower()));
(please not the ".ToLower()"), I get

Code: Select all

WHERE (LOWER("Extent1"."RequestNo") LIKE LOWER(:p__linq__0) || '%')
As you see, the "ESCAPE '/'" is not present in the SQL.

Is this a bug or desired bahaviour?
Is there a way to achieve my goal without the .ToLower().StartWith()?

I am using Devart.Data.Oracle Version 9.1.131.0, together with Entity Framework 6.0.

Greetings
Peter