Search found 8 matches

by ivoryguard
Fri 08 Oct 2021 05:51
Forum: Entity Framework support
Topic: How to support multiple Database at Entity Framework Core
Replies: 3
Views: 15089

Re: How to support multiple Database at Entity Framework Core

I implemented it according to the following post and it worked well :)
https://dev.to/moesmp/ef-core-multiple- ... iders-3gb7

Best regards.
by ivoryguard
Fri 08 Oct 2021 05:48
Forum: Entity Framework support
Topic: How to bulk update/delete with EF Core 5
Replies: 1
Views: 13772

How to bulk update/delete with EF Core 5

Hello.
I am using DotConnect for Oracle/MySQL/SQLite for EF Core 5.

I want to delete mutiple rows with where conditions.
However, default EF Core 5 does not support the feature - it selects rows and deletes each row one by one when I monitor DB.

I found that some EF Core extensions for bulk deleting;
https://github.com/yangzhongke/Zack.EFCore.Batch
https://entityframework-extensions.net/

However, I have no idea where they are compatible to devart EF Core providers.

I can do it by executing Raw SQL scripts, but I want to do it with LINQ elegantly.

Please, let me know how I can achieve my requirement.

Best regards.
by ivoryguard
Fri 09 Jul 2021 09:17
Forum: Entity Framework support
Topic: How to support multiple Database at Entity Framework Core
Replies: 3
Views: 15089

How to support multiple Database at Entity Framework Core

Hello.

I have implemented multiple DB support in a single .NET Framework 4.6 project with DB-First EDMX way at Entity Framework 6.

Now, I will covert my existing app to.NET 5 app using Entity Framework Core including Code first migration. I want to support MSSQL, Oracle, MySQL in a single .NET 5 project by changing DB connection string only.

I have already purchased latest DotConnect for Oracle and MySQL.

Could you please let me know how I can support multiple Database in a single .NET 5 project?

Best regards.
by ivoryguard
Wed 23 Nov 2016 01:35
Forum: Entity Framework support
Topic: Mutiple-DB support with EF6 Code first and conditional column mapping.
Replies: 3
Views: 6164

Re: Mutiple-DB support with EF6 Code first and conditional column mapping.

Thank you for the reply.

I read your answers and reference posting and sample source codes.

I do not want to use "DB Context template", because I want that my codes are simple and flexible for DB schema changes. So I will use fluent mapping with DbModelBuilder.



I have a few questions.

1) The character cases of Oracle DB Schema are same to that of MSSQL. My all Table, column and constraint names are case sensitive, because my app uses auto-generated Entities of EF DB-first EDMX for MSSQL, Oracle and MySQL.

In this case, how does dotConnect for Oracle/MySQL work for Column and Table attributes?

For examples, is [Table(“Employ”)] translated to "Employ" for Oracle and `Employ` for MySQL, or EMPLOY for Oracle and employ for MySQL, in generated SQL script?



2) I cannot use TruncateLongDefaultNames, because the column names were shortened like BlablablaConfigurations=> BlablablaCfgs.

In this case, can I override DB mapping partially for a few columns in “protected override void OnModelCreating(DbModelBuilder modelBuilder)”? I will add Column/Table attribute for remaining properties.



3) For fluent mapping, does foreign key name affect navigation properties? Some foreign key names are different between MSSQL and Oracle because of 30 character limit. It does not make error at EF DB-first because mapping information is stored to SSLD, which is generated automatically by VS2010 EDMX builder.



4) Please, let me know how to set connection string dynamically according to DB type setting. Your sample code uses app.config. I have suffered setting connection string dynamically for EF code first with dotConnect for SQLite Pro before.



5) I know that EF6 in VS2013 provides DB-to-codeFirst code generation. Can I use it for Oracle with dotConnect For Oracle Pro?


6) I have read the latest version of docConnect for Oracle support Batch update.
viewtopic.php?f=30&t=21039&p=69541&hili ... ate#p69541

I think that the main problem of EF is that I have to select first and update later instead of “UPDATE” statement of SQL.

Could you let me know “Batch update” support in detail?

In additionally, dose dotConnect support Entity Framework Extended Library -https://github.com/loresoft/EntityFramework.Extended ?


If I have confidence that the migration from DB-first to Code first of my existing app is possible, I will renew my all devart products in a few days.


Best regards.
by ivoryguard
Mon 21 Nov 2016 03:52
Forum: Entity Framework support
Topic: Mutiple-DB support with EF6 Code first and conditional column mapping.
Replies: 3
Views: 6164

Mutiple-DB support with EF6 Code first and conditional column mapping.

Hello.

I am using dotConnect for Oracle, MySQL and SQLite professional edition.

I have succeeded in supporting MSSQL, Oracle, MySQL at my web app by changing DB connection string only.

My web app was developed with EF 4.1 DB First way.

Now, I want to change EF 4.1 DB First to EF 6 code first in order to use EF6 code first auto migration feature.



I have a few questions.

1) I have implemented EF6 Code First with dotConnect for SQLite. Is it possible to support multiple DBs at the single Model of EF6 Code First by changing DB connection string only?

2) DB schema of my web app is slightly different between MSSQL and Oracle, because the length of all IDs must be equal or less than 30 in Oracle. So, I had to shorten some column names in Oracle Schema. Fortunately, I succeeded in multi-DB support by changing auto-generated model binding XML (MSL, CSDL, SSDL) of EF 4.1 DB First.

I want to change it to EF6 code first with EF code first migration feature. In order to implement it, I think that it must be possible to set conditional column name at EF6 code first or devart products, because actual DB column name mapped from a c# property is different between MSSQL and Oracle.



Is it possible to implement my requirements with devart products?
If it is possible, please let me know how I can do it.


Best regards.
by ivoryguard
Mon 15 Dec 2014 22:29
Forum: Entity Framework support
Topic: Multiple DB Support of EF with both DotConnect for Oracle and MySQL
Replies: 1
Views: 1498

Multiple DB Support of EF with both DotConnect for Oracle and MySQL

Hello.

I have used DotConnect for Oracle with EF4 and WCF RIA Services since 2010.

I succeeded in supporting both MSSQL and Oracle at my app by using separate MSL/CSDL/SSDL files.

Now, I want to add MySQL support, as well as MSSQL and Oracle, with single EF model.

Could you please let me know it is possible to use both DotConnect for Oracle and DotConnect for MySQL in a single VS project?

If it is possible, please let me know how I can achieve it. When I used DotConnect for Oracle at 2010, there is few resources to support multiple DB in a single VS project.

Best regards.
by ivoryguard
Thu 14 Oct 2010 10:09
Forum: Entity Framework support
Topic: How to support MSSQL and Oracle with a single Assembly
Replies: 5
Views: 2897

Another Questions

Thank you for the reply.

Could you please explain Devart SSDLToOracle.tt more?

And.. I have no idea to handle bit and int with ID data type of MSSQL.

I know that they don't be supported at Oracle.
Could you please give a guideline for mapping them to Oracle?
by ivoryguard
Wed 13 Oct 2010 01:23
Forum: Entity Framework support
Topic: How to support MSSQL and Oracle with a single Assembly
Replies: 5
Views: 2897

How to support MSSQL and Oracle with a single Assembly

Hello.

I am developing software at an ISV in Korea.

I have developed a product using WCF RIA Services, ADO.NET Entity Framework and MSSQL Express.

It works very well, but, my customer demands to support Oracle DB.

My database is simple; it has 4 tables with foreign key constraints and uses vchars, int, bit, and int with id (auto-incremental).

Could I make my app support both MSSQL and Oracle by changing only connection string?

If existing entities are reusable, it will be perfect.


If it is possible, I will DotConnect right now.