Oracle 11g and 12c together - entity-framework

I'm trying to use oracle 11g and 12c tools on the same machine.
Scenario:
1 - I'm developing a winforms app using Oracle.DataAccess from 11g
2 - I'm developing a web API with Entity Framework using Oracle.ManagedDataAccess from 12c
3 - I'm support a third party app that depends on oracle client 11g
Situation:
I manage to run and deploy the winforms app without oracle client installation, after that I started to develop the web API, so I installed ODT with ODAC121024 (including oracle client from 12c), and both work fine.
Then I had to support the third party app that needs oracle client from 11g, but I couldn't run the app because I did not had oracle client 11g, so I deinstall every thing on mine machine and installed the full oracle 11g.
Now the winforms app and the third party add works fine, but I couldn't make the web API to work.
I installed the nuget packages oracle.manageddataaccess and oracle.manageddataaccess.entityframework. But I'm getting the follow error on one of the projects of my solution (with 5 projects):
Error 175: The ADO.NET provider with invariant name 'Oracle.ManagedDataAccess.Client' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details.
This error occur on the .edmx file of my data model project.
I can't create another .edmx file as well because the oracle data provider does not show up on Visual Studio (2013).
For this to work I have to install ODT with ODAC121024, but I this will mess up the third party app access.
The question is: how to use ODAC 12c without installing the client?
Thanks.

Related

Getting started using Entity Framework with DB2

This is my first time building a .NET application that connects to a DB2 database, and I really have no idea where to begin as I've never worked with DB2 before.
Here's what I've done so far:
Installed IBM.Data.DB2.EntityFramework
Installed IBM.Data.DB2.iSeries
Installed Entity Framework 6
Now when I try to create a code first model, I don't see DB2 in the list of available data sources, so I'm guessing I need to figure that out first.
What do I need to do to get DB2 added as a data source? I know it's possible because I can see it in the first screenshot in this previously answered question.
you have to install IBM Data Server Client Packages and IBM Database Add-Ins for Visual Studio

Entity Framework Power Tools - cannot connect to Oracle

I have just installed Entity Framework Power Tools Beta 4 into Visual Studio 2013. I am running a .NET framework 4.5 project, using Entity Framework code first with an Oracle database. I have installed the latest ODP.NET from Oracle (version 12), including the EF drivers, and I have Oracle.ManagedDataAccess and Oracle.ManagedDataAccess.EntityFramework referenced in my project.
This set up allows me to run my project and read and access data from the Oracle database. It all works fine. My problem is when I try to use the Entity Framework Power Tools. I can specify a connection using the Oracle database name and credentials, and the dialog says 'Test Connection succeeded'. However, after clicking the next button, I get the following error:
System.Data.ProviderIncompatibleException: The store provider factory type 'System.Data.OracleClient.OracleClientFactory' does not implement the IServiceProvider interface. Use a store provider that implements this interface.
I am confused because my project is able to use the installed ODP.NET as is to communicate with the Oracle database via Entity Framework. Most of the research I have done on the WWW suggests there should be a problem with versions and the contents of the web.config - but if this is the case surely I wouldn't be able to use EF with Oracle in my project without errors?
Is it just the case that the Power Tools do not work with Oracle?
Cheers!
Martin
As Christian says in his comment, you need to install ODP.NET as a provider that Power Tools can use. I did this by installing Oracle Developer Tools for Visual Studio.

Umbraco via Nuget - how do I change the database?

I have installed Umbraco 7 via Nuget
Empty ASP.NET 4.5 project
Package Manager console command: install-package umbracocms
Build & run, following the Umbraco wizard
Looking in the web.config this is writing to the SQL Server CE database on my system which I definitely DO NOT WANT because of a known issue with Web Matrix / IIS Express and SQL CE
Link to known issue on Umbraco forums
How do I tell Umbraco to use my SQL Server 2012 Express database? Is it just the web.config that I change? Do I do this before building & running for the first time?
Build the project and run in (without debugging).
When you are asked to enter a username, email address and password do so.
Before hitting the green INSTALL button, click 'Custom'.
The custom install screen allows you to choose which database to install to. In my case I have two versions of SQL Server (2008 R2 and 2012 Express and the former I don't have admin rights to) but there is only one SQL Server option. I had to specify a custom connection string like so:
Data Source=APIWSEMMA\MYSQL2012;Initial Catalog=MyUmbraco;User ID=sa;Password=MyPassword
Now begin the installation. You should see all the tables created in your database when it is finished.

Integrating Entity Framework 6.0 with Postgres 9.3

I have a local database developed in Postgres 9.3. The Postgres server name on my computer is just "localhost". I would like to use the Entity Framework 6 Designer that is built into Visual Studio 13 to automatically generate a data model of EF classes and properties that correspond to the database tables and columns.
As described in various web articles, and using Nuget package manager, I added onto VS 13 these extensions or packages: EF 6, Npgsql, Npgsql Data Provider for EF 6, and Dotconnect express for Postgresql. Afterwards, in the VS 13 Server Explorer window, I was able to connect and see my Postgres tables and columns.
However, I cannot seem to get the EF Designer Wizard to automatically generate the .edmx file. I tried adding an ADO.net data object, selecting "EF Designer from Database" and alternatively, "Code First from Database." When I got to the next screen, I had to choose a Data Source. I tried both "MS SQL Server Database File" and alternatively, "Other." For the Data Provider, there was no other option than ".Net Data Provider for SQL."
In the next screen I tried to create a connection, using SQL server authentication, with user name and password, but I could never get VS 13 to connect or even display the Postgres server like it did in Server Explorer window. For the Server Name I used the same one as I used for the Server Explorer window, ie. localhost.mydatabasename.myschema. For the SQL User, I used the owner of the Postgres database, a Role I created, ie. mydatabasename_role.
When that faied, I tried going into MS SQL Management Studio 2014 to see if I could display the Postgres server there, using the same info used in the Server Explorer window, but I could not get SSMS to display the Postgres server there either. Is there a way to automatically generate the data model and .edmx file as I have been trying, using just VS 13 and SSMS 14? Or do I need to purchase the proprietary / licensed version of dotconnect for Postgres developed by Devart? Thank you in advance.
A Visual Studio plugin is currently being developed which supports the EF Designer Wizard.
You can find it here: https://github.com/npgsql/Npgsql/pull/213
After about a week of research and banging my head againts my desk, I FINALLY got my Npgsql MVC Entity Framework application to work... and work WITH the wizard. The steps are below....
1) Close Visual Studio, then download and install Npgsql PostgreSQL Integration from: https://marketplace.visualstudio.com/items?itemName=RojanskyS.NpgsqlPostgreSQLIntegration
2) Reboot your computer. (yes, it's needed, I promise)
3) Open visual studio and install the following NuGet packages, IN THE ORDER listed and the VERSION listed...
--> EntityFramework version 6.0.0, then clean and rebuild
--> Npgsql 3.1.0, then clean and rebuild
--> EntityFramework6.Npgsql 3.1.1, then clean and rebuild
NOTE: You may need to uninstall other Nuget packages if these will not install in the order and version listed. If so, just make note and add them back later. and yes, you will want to clean/rebuild between each one above.
4) Close all applications and restart your computer. (yes, it's needed, I promise)
5) After your computer restarts, open Visual Studio again and go to your solution. NOTE: I advise you add a new project for your database connection, but this is more a preference than anything.
6) Try using the Entity Framework Wizard again. You should see the Npgsql selections and it shouldn't just crash on you.

Trouble installing ATG 10.1

Past two days, I was trying to install ATG in my windows machine using the ATG Installation and Configuration Guide.
I am able to install,
Oracle ATG Web Commerce platform
Oracle ATG Web Commerce Search
Then before installing CIM, I tried to configure the database. I am using MySQL 5.6.13.
In the section Creating Database Tables for ATG Portal, they asked to run the following command to run the script
install-mysql userid password database
but in the above command, what database name I should give?
Please guide me on this.
Thanks.
Assuming you are installing the Commerce Reference Store (CRS) you can use the following:
crsprod
as specified on page 9 of the CRS installation guide
If you are not using CRS, you can use whatever name you want since you then need to configure it in your DataSource files.