Trying to add Ado .net Entity Model. Then I select EF Designer, Cannot add tables - ado.net-entity-data-model

Trying to add Ado .net Entity Model. Then I select EF Designer, The Establish DB Conn, Then select the Framework 4.3 and it comes back to this screen below again instead of selecting tables in the DB

Related

Entity Framework 6 with Oracle 10g problem

I try to import stored procedures from an Oracle 10g database using an Entity Framework 6 database-first approach but after I import stored procedures from the database and then I open Oracle SQL developer to open the imported stored procedures and I found in just "create or replace " in source code for all stored procedures on the same schema even the ones I didn't import by entity framework in my project why this happens and how to overcome
After I have search I discovered it's better to use ADO.NET with Oracle 10G database and if you want to have entity framwork experience with Oracle database there is one paid third party library called Devart.Data.Oracle.EF6

Pre generated views using entity framework power tool are not working

I am using entity framework with DB first approach. I have migrated from EF5 to EF6 successfully. In EF5, I was using pre generated views to improve startup performance. In EF6, it is not working. I have generated views using power tool. Power tool generated it successfully and I can build the application without any error.
But When I run it, getting following error:
The current model no longer matches the model used to pre-generate the mapping views, as indicated by the ViewsForBaseEntitySetsfc4437b421d2fd7f4d645bf31e3cb5b1b8374d9c77a07ef5f36c1cac0bfea31a.MappingHashValue property.
Pre-generated mapping views must be either regenerated using the current model or removed if mapping views generated at runtime should be used instead
I am not able to understand why there is difference between the hash value generated via power tool and generated by EF at run time. There is no change in the edmx file.
There are more than 290 entities in edmx.
Version of entity framework in 6.1.3.
Power tool is VSPowerTools-Beta4.
I am using visual studio 2013.
Code generation startegy of edmx is 'Legacy ObjectContext'.

EntityFramework 4.0 Mapping Oracle to Designer Class

I've taken over a project in VS 2010 that uses .NET 4.0. It uses Entity Framework version 4.0. I'm wondering if I should upgrade to Entity Framework 6.0?
While mapping a new table, I noticed the previous developer set his columns on a table as Integer and mapped it to the designer class. However, upon closer look at the entity designer class (.cs) the result is INT32.
However when I created a table with similar specs my Integer column was mapped as decimal in the designer class.
So in a nutshell - it is mapping Oracle Integer to .NET decimal.
I can only guess that the previous developer used brute force to change the properties of each column in the visual EDMX file and set it to INT32.
I would have to select each column of my table in the visual design (EDMX) and ensure it is INT32 in the properties.
A bit tedious but has this been cleared up in EF 5.0 or EF 6.0 as a more straightforward mapping? INTEGER to INT32?
Has EF 5.0 or EF 6.0 cleared up the mapping?
I'm using Oracle 11G.
After further research you can use Oracle NUMBER(10) which tranlates to INT32 on the .NET end.

Does Entity Framework need to be installed for all projects in a solution?

I have a VS2013 solution that contains two projects. The first project is my Entity Framework Model and the second project contains the Windows Form I want to use the EF models in.
Does the Entity Framework need to be installed in the Windows Form project if it is making use of the objects from the Entity Framework Model project? Is it enough just to reference the Entity Framework project from within the Windows Form project?
I am using Entity Framework 6 in Visual Studio 2013.
You have to reference the Entity Framework because you are using your models that need the entity framework to work...
Anyway you can try to remove the Entity Framework reference from your Windows Form project and see if it works... If it compile then everything is fine, otherwise you will have to add the reference again.

How to persist poco classes generated using EF 4.x POCO Entity Generator for C#

I am using EF 4.x POCO Entity Generator for C# for generating classes from database. I have put some data annotation on some classes and its working fine.
But when i made any change in the database and update the entity model, it removes all the changes in the poco classes (data annotations) because "EF 4.x POCO Entity Generator for C#" is persistence ignorant.
But i want to keep my changes. What should i do?
Very common problem. What you want is Buddy Classes.
http://hartzer.wordpress.com/2010/01/26/mvc-buddy-class/
Since POCO's are partial classes, you can create "buddy classes" (that persist outside of the EDMX ad regenerated code) for each POCO with Meta Data Annotations.
Your solution is to generate your code from the database using the entity framework power tools.
Additional db changes should be done to your code first and the use the database migrations feature of entity framework to generate your SQL script to apply to the database using the update-database command in the 'Package Manager Console' of Visual Studio
I go over a similar procedure here at the end on my DEV215 Entity Framewok for Real Web Applications Channel 9 video
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/DEV215

Resources