Hello,
I would like to use an connection of type "Devart.Data.Oracle.OracleConnection" to connect to the Entity context.
I want use this type, to use the FailOver feature of DevOrt Oracle Connection.
But I cannot give over an OracleConnection, when I initialize the context. An EntityConnection is expected.
What can I do, to use the feature FailOver an also the entity framework?
Error Message, because the types are totally different:
Cannot convert type 'Devart.Data.Oracle.OracleConnection' to 'System.Data.EntityClient.EntityConnection'
Use of Devart.Data.Oracle.OracleConnection' for Context connection
-
- Posts: 11
- Joined: Tue 18 Sep 2012 07:55
Re: Use of Devart.Data.Oracle.OracleConnection' for Context connection
We recommend you to use the DbContext template to generate a descendant of the DbContext class so that you can pass OracleConnection to its constructor: http://msdn.microsoft.com/en-us/library ... 03%29.aspx.
-
- Posts: 11
- Joined: Tue 18 Sep 2012 07:55
Re: Use of Devart.Data.Oracle.OracleConnection' for Context connection
The problem is, that for entity objects the connection should be of type
System.data....
But when I want access also Oracle packages, which we have integrated via Oracle Devart Package wizard, then Devart.Data.Oracle is used.
But I want made some changes via Entity and some other via Oracle package.
But this must be done in the same transaction.
But I cannot use the same connection, because they are different types !!!
Entity framework is using System.Data
Package wizard is using Devart.Data.Oracle
How can I proceed?
System.data....
But when I want access also Oracle packages, which we have integrated via Oracle Devart Package wizard, then Devart.Data.Oracle is used.
But I want made some changes via Entity and some other via Oracle package.
But this must be done in the same transaction.
But I cannot use the same connection, because they are different types !!!
Entity framework is using System.Data
Package wizard is using Devart.Data.Oracle
How can I proceed?
Re: Use of Devart.Data.Oracle.OracleConnection' for Context connection
Please refer to http://msdn.microsoft.com/en-us/library ... 03%29.aspx: as we mentioned in the previous post, you can pass the Devart.Data.Oracle.OracleConnection object to this constructor of the DbContext class. To generate the descendant of the DbContext class, use the DbContext template in Devart Entity Model (*.edml).