How to launch entity framework project - entity-framework

I am completely unaware of EF, but got an EF project from a candidate. Couldn't open it in Visual Studio 2010 and want at least to run it in IIS to review if neccessary functionality has been done.
How to install it in IIS ?

Entity Framework 6 is not supported by VS 2010, please check that this is not your problem.
Ensure your IIS server has .NET 4 for EF 5 and below, or .NET 4.5 if using EF 6
You will probably also need to edit the supplied connection string to point at a valid database server.

Related

Visual Studio 2012 with .NET 4 Framewrk install Entity Framework 6 tools for Visual Studio 2012

As mentioned in the title I need to modify a very old project. It uses .NET 4 Framework and connects to a local SQLite database. I used Visual Studio 2012 to avoid compatibility problems.
I cannot open the .EDMX file - I get this error:
Error 10027: The XML namespace for the conceptual model's Schema element is not supported on this project's target framework version.
I tried to install Entity Framework 6 because I read that should resolve the problem, but I'm not able to find it anywhere.
How can I fix this problem?

DOTNET CLI RC2 EF migrations

I just migrated to RC2 from RC1 and having a really hard time getting the ef commands and migrations to work.
I've read several other questions and have ran into the problem that's getting described in this link as a known issue.
The problem is that if I follow the instructions and create a brand new console application (.core) I'm still getting the following message:
This preview of Entity Framework tools does not support targeting class library projects in ASP.NET Core and .NET Core applications. See http://go.microsoft.com/fwlink/?LinkId=798221 for details and workarounds.
What am I doing wrong? Do I need to revert to rc1?
How did you do this migration ? I ask because in my case everything works time - as for now.
In my case I have removed all RC1 components first and then I have installed new RC2 components...
Next I have created new APS project using new Visual Studio Templates to get correct references and just moved my code to this new project.
Of course it's few things which I had to update in my code, but everything works fine for me including ef commands and migrations.
As you can read in ASP.NET Core installation guide
Before you start
Remove all previous versions of .NET Core from your system by using Add/Remove programs.
You need RC1 setup file to uninstall this component - if you do not have it, check StackOverflow - you can find link to download missing files.
Try follow the docs:
ASP.NET Migration
Migrating from ASP.NET 5 RC1 to ASP.NET
Core
Migrating from DNX to .NET Core CLI
ASP.NET 5 RC1 apps were based on the .NET Execution Environment (DNX)
and made use of DNX specific features. ASP.NET Core RC2 is based on
.NET Core, so you must first migrate your application to the new .NET
Core project model. See Migrating from DNX to .NET Core CLI for more
information.
Hope this help you :)

using EntityFramework 6 with SQL Server Compact 4

I am developping an application using Entity-Framework and Sql Server Compact 4 in a Visual Studio 2013 project.
Here is the list of add-ons I installed via NuGet :
Microsoft.SqlServer.Compact 4.0.8876.1
EntityFramework 6.1.3
EntityFramework.SqlServerCompact 6.1.3
Then I want to add an ADO.NET Entity Data Model ("Code First from database").
I choose a sdf file that I already have created with SQL Server Compact Toolbox. The Wizard find it and generate a connection string
Data Source=E:\[...]\myDBtest.sdf
Then I click "Next >", the Wizard becomes gray, freezes a few seconds and then closes itself without showing the following step.
At the end, it did not generate anything into my project.
I tried to rebuilt the project before adding the ADO item.
And I even tried to reboot the computer ... with no more success.
Any suggestion or same experience ?
Of course you can use Db First with EF and SQL Server Compact. In order to avoid the error, install the latest Visual Studio Tools for EF (6.1.3) https://www.microsoft.com/en-us/download/details.aspx?id=40762

Entity Framework Power Tools does not appear in VS 2012

I have installed EntityFramework 6.01 and have added a reference to my project. I closed Visual Studio 2012 and I then installed EF Power Tools Beta 4.
I re-opened Visual Studio 2012 and right-clicked my project containing dbContext. No entry appears in the context menu for Entity Framework. No error messages occurred during installation.
Are there additional pre-requisites to using EF Power Tools?
I think I have discovered the solution. My company uses VB.net as the standard development language. As a test, I started a C# project. Entity Framework Power Tools are fully present in the C# project. It appears that Entity Framework Power Tools are not yet available in VB.net projects.
Try right clicking on the project. I just looked at the beta 4 description and it does not reference EF 6. But the reverse engineer classes from database should show up with a right click on the project, indicating that at least the power tools installed correctly. These are the only comparability issues I could find:
Generate Views won’t work with prerelease versions of EF6.
It will, however, work with the RTM version when it’s released.
View Entity Data Model won’t work with EF6 on Visual Studio 2010.
Beta 4 updates the Power Tools to work with Entity Framework 6 and Visual Studio 2013. The following issues have also been fixed in this release.
Power Tools don't work when project is under a solution folder
Power Tools stop working when EF.dll is loaded into VS
Specific info found on the ado.net blog on msdn

Can I use EF4 in VS 2012?

I wanted to follow up on a post from last year ("EF5 , Widows Forms , Dragging a chield entity from project datasource into a GridView creates only 2 columns").
I believe the problem described with EF5 is still true and the solution found (use EF4) continues to be the only reasonable answer.
Before I upgrade to VS2012, I wanted to check whether anyone knows if there is any problem using EF4 in VS 2012.
Anyone with experience on this?
VS2012 requires .NET Framework 4.5 which is an in-place update. This means that once you install the .NET Framework 4.5 it will be always used when running .NET Framework 4 or .NET Framework 4.5 apps. This also means that you will be running EF5 even if you target .NET Framework 4 in VS (targeting is only a design time thing which prevents from using APIs that were not available in the targeted .NET Framework version while at runtime the app will use the version installed on the box).
With regards to the problem you are reporting - take a look at this bug report on the EF codeplex site as it apparently contains a solution to the problem