SQLite and Entity Framework 6 - entity-framework

I have already visited those questions and problem solving links:
Entity Framework 6 + SQLite
Visual Studio 2013 say me Entity framework that the provider of SQLite is not found
http://entityframework.codeplex.com/wikipage?title=Rebuilding%20EF%20providers%20for%20EF6
I downloaded and installed the 1.0.92.0 SQLite Release Package from here http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
I create a new project (class library) in visual studio 2013.
Through NuGet I add System.Data.SQLite (which on itself also adds Core, EF6 and LINQ), EF is also installed.
I create the new ADO.NET Entity Data Model, I generate from the DB, select my DB (testing connection - ok), I go to "Which version of Entity Framework do you want to use?" and I have only the option "6" which is unavailable and it says:
Your project references the latest version of EF, however, an EF
database provider compatible with this version could not be found for
you data connection.
From what I have read, 1.0.92.0 should work with EF6 (even from 1.0.91.0)

I have done somé testing, and the SQLite support for the EF Tools appear to be completely broken, due to an incomplete implementation of the EF6 provider, which is also not installed in GAC. I would file an issue with the System.Data.SQLite developers

Related

Where is Entity Framework in Visual Studio 2017?

I've verified that Entity Framework 6 Tools is installed as suggested in other answers on this site, but ADO.NET Entity Data Model never shows up in the New Items/Data list. I've also tried installing the .NET CORE 2.0 SDK as other answers have suggested to no avail.
To be clear, I'm not creating a .NET CORE application, I'm just trying to make a class library based on .NET framework 4.6. I created the project via .NET Standard and selected Class Library (.NET Standard).
I just need to install EF so I can do a code first generation from my existing SQL Server DB.
Don't use .NET Standard, select a .NET Framework project type.
.NET Standard is an abstract "Core or Framework" option, as if the naming wasn't confusing enough.

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.

VS2012 and Entity Framework 6.1.3 compatibility

I am using VS2012 and trying to run a code I have received from a colleague (who happens to use VS2013). He is using EF (v 6.1.3) Code-First New Database approach.
Now I am trying to enable the migrations to create the database, but Package Manager Console is unable to identify Enable-Migrations code.
Below is the error I receive (please click the image to enlarge)
I have installed EF Tools for VS2012, but that does't resolve the issue. Even Microsoft tells that it can only resolve EF Code-First Existing Database problems.
I don't know if I have to rollback Microsoft.NETCore.Platforms v1.1.0 to a previous version.
Any help on this is appreciated.
Edit
Error tells that I need a newer Nuget version, but VS2012 doesn't support Nuget v2.12

Cannot generate DB from EDMX - XAML file does not exist

In an EF project with an EDMX entity model, when I right click and hit Generate database from Model... I get the error:
An exception occurred while attempting to generate the database script from the model because the specified workflow file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen\Generate T-SQL Via T4 (TPH).xaml' does not exist.
No XAML files featuring the word 'generate' exist at all on my hard disk. I thought I installed all I need with VS 2013 and the NuGet packages.
I also installed Entity Framework 6 Tools for Visual Studio 2012 & 2013 but no XAML files were added, the error still appears.
On MSDN, the generate database wizard is discussed under ADO.NET Entity Data Model Tools (http://msdn.microsoft.com/en-us/library/vstudio/bb399249(v=vs.100).aspx) but I can't find it to download online or from the VS extensions 'store'.
In Windows Programs and Features I have these items containing "entity":
Entity Framework 6.1.2 Tools for Visual Studio 2013
Entity Framework Designer for Visual Studio 2012 -enu
What am I missing?
I think my old project was set to use TPH but that strategy is no longer available, or was never available and I forgot that I installed the Powerpack to get it. Or maybe never used TPH.
This quote is interesting from a blog:
"Got the EF Powerpack that allowed generating TPH mappings." - http://www.jefim.eu/blog/2013/01/entity-framework-tpt-vs-tph.html
PowerPack here: https://visualstudiogallery.msdn.microsoft.com/df3541c3-d833-4b65-b942-989e7ec74c87
I seem to recall (I have been on a no-sql contract for years and last touched EF in v4) that I didn't like Table-per-Hierarchy and should be using Table-per-Type. I get the feeling that in the last couple of years, this has become the general feeling in EF or perhaps model-first was 'de-emphasised' in favor of code-first, which does support TPH and does database generation some other way? Guessing.
So I think the answer is that:
With Model-first, TPH is not available, use TPT.
If TPH is really wanted, then use the PowerPack (though it says VS2010) or maybe go code-first.

Uninstall Entity Framework Tools 6.1.1 for VS 2012 removes Entity Data Model from new items

I have recently had issue using the Entity Framework 6.1.1 with my sqlite data provider. I was hoping to go back to EF 6.1.0 (I have update 2 installed) so I uninstalled Entity Framework 6.1.1 tools for visual studio 2013. After I did this I tried to add my Ado.Net entity data model but it has disappeared from the list of new items. Has anyone seen this?
You must install the old EF Tools again (select Repair VS in controlpanel->programs & features). This is also written in the docs.