Updating EF 4.6 edmx model in VS 2015 - entity-framework-4

We have a legacy EF 4.6 project not yet migrated to a newer version of EF.
Now I want to update the model from the database (add a new table) so I open the EDMX in the designer like in VS 2010 and choose "Update from the database". This gives me a warning that "Your project references an older version of Entity Framework. ..."
The only choice in this update from the database action it gives me is EF 5.0 but I need EF 4.6
Is it possible somehow to make the model update in the designer without upgrading to a newer version of EF or using an older version of VS?

I have just come up against the same problem (although I was stuck on v4.0.0.0). The solution was to install ADO.NET Entity Framework 4.1.
This put the required tooling on my computer and allowed me to update my model.

Related

How do I update my Model without updating the EF version?

I am working on a Legacy project which uses "EF4.0" (system.data.entity version 4.0.0.0 runtime version v4.0.30319.
There are many places in the project where properties on "context" objects are used which are not available in the newer version.
DB team has made some changes & added a few entities which I need to use in the project, now when I try to " Update Model From Database" VS asks me to select the version of EF I want to use and gives only 2 options "Entity Framework 5.0" & "Entity Framework 6.x". But I don't want to update to these versions, as this will require code changes in many places which I want to avoid.
This is a DLL project and in app.config there are only connection string settings, no assembly configuration sections.
The version of the visual studio I am using is VS 2017 community edition(version 15.3.3).
While googling i found some articles which suggested i installing 4.x runtime via NuGet package manager, but i couldn't find any package for version 4.0
(https://learn.microsoft.com/en-us/ef/ef6/modeling/designer/select-runtime-version)
How do I update my Model without updating the EF version?

entity data model wizard crashes with oracle connection

When trying to create model with entity frameowrk database first method, the entity data model wizard crashes. I am trying to connect to oracle database.
Oracle.ManagedDataAccess version :19.6
Oracle.ManagedDataAccess.EntityFramework version : 19.6
ODAC Version 18.3
Entity Framework Version:6.0
Image has been attached for refernce. Process after process mentioned in the image is crashing.
The rule still applies today. ODT Version must match the version of oracle.manageddataaccess and oracle.manageddataacess.entityframework obtained by nuget. It is very tempting to update thru nuget to a later version, but ODT will than crash.
I often have a parallel project to generate my code first model and than copy the files to my model project.
I'm using:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Microsoft ASP.NET MVC 5, NET.Framework 4.6.1
It was happening the same error in my project, I was tryng to use EnityFramework and Oracle Manage Data Access most recent versions. When downgrade the fallowing versions. It start to working without any errors
Versions that worked for me:
EntityFramework 6.1.3
Oracle.ManagedDataAcces 12.2.20230118
Oracle.ManagedDataAcces.EntityFramework 12.2.20230118
The EntityFramework 6.4.4 worked to... But every time I try to scaffold a Entity from the database, It autommatically downgrade to version 6.1.3

Cannot connect to Oracle Database with Entity Framework in ASP.NET MVC project

Context : I'm creating a web app (in ASP.NET MVC 4) that will offer access to an already existing Oracle database. I'll only need to be able to read data from that DB, no insert, or update, etc. I'm working in Visual Studio Express 2015 for Web.
I've searched a lot for answers to my problems, but to no avail.
My goal is to create models with Entity Framework Database first. I have added Entity Framework, Oracle.ManagedDataAccess, and Oracle.ManagedDataAccess.EntityFramework to my project with NuGet.
However, when I try to add an "ADO.NET Entity Data Model" to my Models, whether I select "EF Designer from database" or "Code First from database", I get the following:
What am I missing ?
I've found resources saying I need to install Oracle Developer Tools for Visual Studio. However, it is not supported in Visual Studio Express, and I cannot change my IDE.
I don't have Oracle client installed on this dev computer, but I sqldeveloper, and have no issue accessing the database with it. Do I NEED to install the Oracle client ? Aren't the dll installed throught NuGet enough ? I'm asking because I'm an intern, and installing any new piece of software requires validation, that takes quite a long time.
add connection your database to your project
Insert New Item an Empty Dataset
In that dataset insert TableAdapter from toolbox into your dataset.
window pops up for selecting tables (you can write sql for select a desired table)
after step 4. you have your entity.
I have the same bug and I fix like this:
You need instal:
Microsoft Visual Studio 2015 or later with .NET Framework 4.5 or later.
Oracle Database 12c or later.
Oracle Data Access Components (ODAC) 12c Release 3 (12.1.0.2.1) or later from OTN. The ODAC download includes Oracle Developer Tools for Visual Studio and ODP.NET
Files required for this tutorial.
Using NuGet to Install and Configure Oracle Data Provider for .NET tutorial.(install: Oracle.ManagedDataAccess.EntityFramework from Nuget).
refer: http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/2015/entityframework_linq_modelfirst/Entity%20Framework%20LINQ%20and%20Model%20First.html#overview

ASP.NET-5 with EF6

Is it possible to use the new ASP.NET with Entity Framework 6 instead of Entity Framework v7?
I use the latest Visual Studio 2015 and could not add a Ado.Net Data Model but the Reference to EF6 was added.
Most existing packages, such as EF6, will not support asp.net Core 5; because of the significant differences, they need to be manually updated. If you're wanting to use EF6 you'll need to stick to asp.net 5 (not Core).
I've run into a series of issues running the EF6 package manager commands, such as Add-Migration, in VS2015 CTP6; I believe they're still working on updates. I was able to get them working in a .Net 4.5 library that is referenced by my .Net 5 libraries, but I've found that occasionally I have to uninstall and install EF6 again to get the package manager commands working.

What are required assemblies for Entity Framework 4.1 and SQL Compact?

Previously I used Entity Framework 4.0 CTP5 (code-first) and SQL Compact in my projects. I had the following packages installed using NuGet:
SQLCE.4.0.8435.1 (version 4.0.8435.1)
EFCodeFirst 0.8 (version 4.0.30319.0)
EFCodeFirst.SqlServerCompact.0.8 (version 4.0.8435.1)
Now when EF 4.1 RC is published, I want to update all my libraries to the latest version. NuGet feed doesn't contain any updates for SQLCE.4.0.8435.1 anymore, but it has a new package 'SqlServerCompact - 4.0.8482.1' (new package, not a new version of existing package). Presume, that it was just renamed and I should install it. Is it right? Presume, yes.
NuGet also doesn't contain any updates for 'EFCodeFirst' and 'EFCodeFirst.SqlServerCompact' packages. But it has a new 'EntityFramework 4.1.10311.0' package.
So what should I install? Are 'EntityFramework 4.1.10311.0' and 'SqlServerCompact - 4.0.8482.1' enough for using EF code first with SQL Compact?
Yes, we're working on an EntityFramework and EntityFramework.SqlServerCompact this week.
I think we have to wait for them to release an updated EF + SQL CE library /sign

Resources