connect to PostgreSQL 9.5 database from Visual Studio 2015 via Npgsql - entity-framework

I installed NpgsqlDdexProvider-3.1.0, through NuGet added to the project packages Npgsql v.3.0.5, EntityFramework5.Npgsql v.3.0.5, EntityFramework v.5.0.0. I try to add connection to database via Server Explorer and get error:
Failed to find or load the registered .Net Framework Data Provider
My data provider: .Net Framework Data Provider for PostgreSQL (Npgsql Ddex Provider)
My connection string:
Host=localhost;Username=postgres;Password=1;Database=postgres;
How to fix it?

You must add provider's dll to GAC and assemble of your IDE.

Related

Entity Framework and SQL Server Compact Edition DDEX Provider

I try to use Entity Framework with a SQL Server Compact Edition database file, but when I try to update all models in VS, this message appears:
Can you help me please?
You can install "EF Core Power Tools", they include a simple DDEX provider for SQL Server Compact 4.0

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.

Error "The provider did not return a ProviderManifestToken string." with Firebird

I have created an Outlook 2013 add-in which is integrated with a Firebird database using Visual Studio 2013. This works totally fine, the packages which are used in this add-in are
EntityFramework 6.1.3
EntityFramework.Firebird 4.10.0
FirebirdSql.Data.FirebirdClient 4.10.0
When I converted my project to Visual Studio 2015, it give me the error shown below
Error :
The provider did not return a ProviderManifestToken string.
Could not retrieve storage version.
I have also tried to update packages but this did not work. I have updated the packages to:
EntityFramework 6.1.3
EntityFramework.Firebird 5.0.5
FirebirdSql.Data.FirebirdClient 5.0.5
This happens when you're not connected to database or the connection string is not valid to connect to database. This is the method that might be interesting for you.

How to install Npgsql as a data provider for ADO.NET Entity Framework?

I have read all that I can find, but no luck. In Visual Studio 2015 Community, here is what I did (with no luck):
Ran: Setup_NpgsqlDdexProvider. This installed Npgsql 3.0.7 and EntityFramework 6.0.0. It also installed Npgsql 3.0.7 in the GAC and the machine.config.
install EntityFramework6.Npgsql
Updated the Npgsql (with Nuget) to version 3.1.6
Updated the EntityFramework to version 6.1.3
Updated the GAC to Npgsql 3.1.6
changed the machine.config at %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\CONFIG and %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\CONFIG to Npgsql version 3.1.6
When I go to add the ADO.NET Entity Data, I check model from the database. Set the connection (it tests good). Upon returning from the connection window, the Wizard closes immediately.
How are the newest versions of EntityFramework6 and Npgsql installed for ADO.NET?
TIA
Everything is described here, step by step on the page. Below is a link to github:
How to setup NpgsqlDdexProvider 3.1.
I use Visual Studio 2015 and the database server PostgreSql 9.4.
I installed Npgsql-3.1.8.msi who installed library Npgsql.dll in the GAC:
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Npgsql\v4.0_3.1.8.0__5d8b90d52f46fda7
and installed NpgsqlDdexProvider-3.1.0.vsix that allows you to add a connection string under VS in Server Explorer for PostgreSQL.
It's work perfectly for me.

Binding IBM SQL Database with ASP.NET 5 in Bluemix

I'm creating an application in ASP.NET 5 and need to deploy the same in Bluemix. I would want to connect to IBM SQL Database in Bluemix.
I'm trying to use ODBC to connect to IBM SQL Database. But, when I build my application in Visual Studio 2015, it throws compiler error.
This is the error that I'm getting.
The type or namespace name 'Odbc' does not exist in the namespace
'System.Data' (are you missing an assembly reference?)
Visual Studio shows that the System.Data.Odbc is available in DNX 4.5.1 but unavailable in DNX Core 5.0 and hence it throws the error.
I'm stuck and unable to proceed further.
What should I do to be able to use the ODBC connection?
Can anyone please help.