Use Entity Framework in .net 4.0 with Oracle database - oracle

I#m having the same problem as in issue: Use Entity Framework in .net 4.0 with Oracle database - possible?
The question was not answered in my opinion. So I would like to know if there is a possibility of using EF6 with Oracle.ManagedDataAccess.EntityFramework for a .NET4.0 project.

Related

Cannot find ADO.Net in VS2022 Community Edition

I've recently started using VS2022 Community Edition Version 17.4.4 after using VS2017 Enterprise Edition for many years. I've started a new project after selecting ASP.Net Core Web App using MVC. After creating the project, I used Nuget to import the MS.EntityFramwork packages I need and the went to add a new item to select ADO.Net from my DB for my Entity Framework. However, as you can see from the screenshot below the packages are there but ADO.Net is not.
Although I cannot find ADO.Net I can select Scaffolding if I want to and something tells me that is the only option available to me. I've used this process of adding Entity Framework many times and I think it's no coincidence that it isn't available after updating my Visual Studio. Can someone please confirm this is my only option to work with my SQL database or is there something I'm missing in order to access ADO.Net.
ADO.Net only works with .Net Framework. You can pay attention to see what your framework version is. If it is .Net XXX, it should be that you have created the wrong project, and the type of project you should create is ASP.Net Web Application (.Net Framework).
If following the methods above doesn't work, please speak up.

How far is the implementation with Oracle and the entity framework

I want to NO I have to use Entity Framework with Oracle database (version is not defined).
I would like to use Code First and I have read in an article from 2012 that it is not implemented by Oracle.
1) Has that changed with latest EF 6.0.2?
2) Is there still something which should not work in latest EF 6.x you made the experience with?
Entity Framework 6 support is implemented in Devart ADO.NET providers.
Please check below mentioned article for full details (posted on October 17th, 2013).
Entity Framework 6 Support for Oracle

Entity framework 6.0 with oracle 11

is the Entity framework 6.0 compatible with oracle 11 ?
Will there be support for Entity Framework 6 in managed ODP.NET ?
Any reliable provider in the market for Entity framework 6.0,Oracle 11 support ?
As of today dotConnect for Oracle from Devart should work as far as I investigated (here). I don't think the guys from Oracle has reached so far to make ODP.NET compatible to EF6.
Actually I am also working on a project and I am curious about the results.

Does ODP.NET support EF Model-First with DbContext?

We're trying to use an Entity Framework Model-First approach with Oracle 11g and ODP.NET 11.2.0.3.20. We'd like to use EF 4.1 or EF 5.0 with DbContext.
Short version:
Has anyone managed to do that?
Long version:
On VS2010 and Entity Framework 4.0, everything works fine. I'm able to Generate Database from Model.
When I try it with EF 4.1 or EF 5.0, I always end up with an Object reference not set to an instance of an Object error message in Visual Studio:
I tried it the following ways:
Created a new EF 5.0 model in VS2012, set code generation workflow and templates to the Oracle stuff (Generate Oracle via T4 (TPT).xaml and SSDLToOracle.tt). Then I clicked on Generate Database from Model and chose a working Oracle connection, but Visual Studio just shows that error.
Created an EF 4.1 model in VS2012, same error.
Created an EF 4.1 model in VS2010, same error.
Tried a Database-First approach in EF 5.0 and EF 4.1, same error.
It only works if I'm using VS2010 and EF 4.0.
However, Oracle claims that it should work, see http://www.oracle.com/technetwork/topics/dotnet/downloads/install112030-1440546.html :
ODAC supports DbContext APIs.
Has anyone managed to use EF 4.1 or 5.0 with Oracle ODP.NET?
EDIT: Turns out it works fine on a 32-bit virtual machine. The problem is only there on my 64-bit Windows 7 machine.
Just delete corresponding connectionstring from project config file. Then choose new connection (to Oracle database) and click to generate DDL.

Feasibility of entity framework and linq to sql

Is it worth spending time in these frameworks. Or they just another framework like microsoft developed in the form of MFC library.
I dont want to waste precious time, so please help. Under what scenarios these frameworks will be helpful.
EF and L2S are Object-Relational Mappers (ORM). They would be used wherever an ORM is used. StackOverflow uses Linq to SQL as its ORM layer, to good effect. Entity Framework is up-and-coming, and although it currently has issues, it will be greatly improved in the upcoming version 4.0.
Your time would be well spent learning one or both of these frameworks, as it will be highly likely you will use an ORM in your applications at some point.
It really depends on what your alternative is. If your alternative is using ADO.NET and DataSets, then yes, LinqToSql and EntityFramework are likely a step forward. If your alternative is NHibernate or another feature rich ORM, then they may be a step backward.
Microsoft has really strongly moved away from LinqToSql while still continuing to offer support for it and making minor changes. Microsoft is recommending all LinqToSql users move to Entity Framework. However, the Entity Framework that came out with VS 2008 SP1 / .NET 3.5 SP1 was in many ways a step back from LinqToSql. The Entity Framework that is coming out in April with VS 2010 and .NET 4.0 should be mostly an upgrade from LinqToSql, assuming you can migrate to VS 2010 / .NET 4.0 sometime in the near future.
YES! It is worth Learning. No! its not just another framework. It is useful for any application that uses a SQL Database to query data and present/do some logic.
Linq2Sql was introduced with .NET 3.5. Very useful if you dont have your own set of domain entities. A bit difficult to map Linq2Sql classes to our own domain entity classes in complexed scenarios.
But, recommend to use Entity Framework. EF was introduced with .NET 3.5 SP1. Much improved version of Linq2Sql and came as part of Olso Mixed Models. This can be used as a real ORM to map our own set of domain entities and the designer provides most of the features.
There is a new version of EF (EF4) ships with .NET 4.0.
Watch Evolving ADO.NET Entity Framework in .NET 4 and Beyond for what you can do with EF4.
Download the "Layered Architecture Sample for .NET" from Codeplex.com

Resources