ADO.NET Entity Framework and SQL Server - entity-framework

I am new to the subject of Entity Framework, I have a database in SQL Server 2005 and I'm working with Visual Studio 2012.
When connecting to the database with Entity Framework I get an error.
Cannot load file or assembly 'Microsof.SqlServer.Management.Sdk.Sfc,
Version = 11.0.0.0, Culture = neutral, publicKeyToken =
89845dcd8080cc91' or one of its dependencies. The system can not
locate an file specified.
thanks

Probably the solution to your problem: http://social.msdn.microsoft.com/Forums/en/vssetup/thread/5abfbb57-dac9-4039-b121-ae21c9b9352c
http://www.sqlservercentral.com/Forums/Topic594847-323-1.aspx

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

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.

SQLite and Entity Framework 6

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

Entity Framework 5 and SQL Server CE: execute generated db schema

Project is using:
ASP.NET MVC4
Entity Framework 5
SQL Server CE
IDE: Visual Studio Express 2012
Issue:
Entity Framework (model-first) has you add your models in the .edmx then you right-click the .edmx to generate database schema. However in VS Express we're unable to right-click the .sqlce file contents to load the option to "Execute Ctrl+Shift+E" the way we can in Visual Studio.
Question:
How can I run the script that was generated by the Entity Framework?
Previous attempts:
So far I've tried to open the Compact database in SQL Server Management Studio but I return an error that SSMS can't load the compact db because it's not the correct type also from Database Explorer I've pasted the script into a NewQuery window and ran the script but threw errors as well.
I downloaded SQL Server Compact Toolbox and was able to run the script. Thanks and credit to ErikEJ.

ADO.NET Entity Framework with OLE DB SQLServer2000 Data Source

Same as Title.
Has anyone found a way to make the ADO.NET Entity Framework work with OLE DB or ODBC data sources? Specifically, I need to work with an SqlServer2000.
Visual Studio 2010 and EF4 do no longer support SQL Server 2000 - are you using VS2010??
Check out this page: http://msdn.microsoft.com/en-us/library/bb896309.aspx
Note
Starting with Visual Studio 2010, the
ADO.NET Entity Data Model Tools do not
support SQL Server 2000.