Questions tagged [edmx]

An .edmx file is an XML file in the .Net Entity Framework that defines a conceptual model, a storage model, and the mapping between these models.

Resources:

How to Create an edmx

The Entity Framework and ASP.NET

edmx File Overview

781 questions
8
votes
1 answer

Visualizing OData/REST metadata into a UML/Database Diagram

I have access to a particular OData service (and metadata), but not the code behind building that service. I'm using REST Clients like Postman to test the service and view its metadata. However, the service is quite large and I am having trouble…
K. Peters
  • 195
  • 3
  • 13
8
votes
2 answers

The difference between EF6 and EF4.1 in files hierarchy

I'm a beginner to Entity Framework . I notice that When I use EF6 with Visual studio 2013: I have .Designer.cs empty file with this comment: // T4 code generation is enabled for model…
8
votes
2 answers

How can I hide a database column in the entity model?

I'm using the Entity Framework 4 and have a question: I have a password column in my database that I want to manage using custom SQL. So I don't want the model to know anything about it. I've tried deleting the property in the Mapping Details…
Nick Butler
  • 24,045
  • 4
  • 49
  • 70
8
votes
2 answers

EDMX connection string

so the story is like this. I have a project, called PA.DLL, which have an entity model inside of it (edmx) file. In another project which i'm referencing to the PA.DLL, i copied the connection string that was created (automatically) when creating…
Or A
  • 1,789
  • 5
  • 29
  • 55
8
votes
5 answers

POCO Class in EF not working as Expected

I have created a DataBase in SQL and created an EDMX in Visual Studio 2012. It automatically created POCO (TT) classes. Everything looks fine. Now I change the column name of a table. I update the EDMX. Opening the EDMX in XML and everything looks…
user2067567
  • 3,695
  • 15
  • 49
  • 77
8
votes
2 answers

.NET Data Model is shown as XML and not as Diagram

That is. I format my computer and install the entire enviroment again, but I can't see the data model diagram. I mean, I open the data model (edmx file) and I see all the DB tables and DB information in an XML file. Not the diagram. I installed…
Faabass
  • 1,394
  • 8
  • 29
  • 58
7
votes
2 answers

Best Practice - Mixing Table-Entities with View-Entities in EntityFramework?

I have a legacy database that I'd like to interact with Entity Framework. The database is highly normalised for storing information about flights. In order to make it easier to work with some of the data, a number of SQL Views have been written to…
Eoin Campbell
  • 43,500
  • 17
  • 101
  • 157
7
votes
4 answers

Visual Studio 2022 Cannot Update EDMX Entity Model from Database

All of a sudden I cannot update the .edmx files I have in all of my projects in Visual Studio 2022. This is something I have done tons of times on various projects for years: open the .edmx, right click empty space, "Update Model from Database". Now…
Nick Reeve
  • 1,658
  • 2
  • 22
  • 32
7
votes
2 answers

Can Entity Framework 4.1 designer "update model from database" for selected entities only?

The situation: Sometimes a database schema is not what you would consider an ideal representation of the system's information and you may not be able to change it. We have been using Entity Framework to create a nicer conceptual model to code…
andrej351
  • 904
  • 3
  • 18
  • 38
7
votes
3 answers

edmx error 'Unable to cast object of type 'MySql.Data.MySqlClient.MySqlProviderServices' 'System.Data.Common.DBProviderServices'

Getting edmx error Unable to cast object of type 'MySql.Data.MySqlClient.MySqlProviderServices' to type 'System.Data.Common.DBProviderServices' when trying to open edmx designer for MySQL model. I have both Entity Framework 6 for SQL service in the…
user559854
  • 89
  • 1
  • 3
7
votes
1 answer

Entity data model, unique index

In my entity data model I have an entity with one property as the primary key and another property that will have unique values too, so I’d like to create a unique index on that other property. The situation is very similar to the Person entity with…
Ivan Gerken
  • 914
  • 1
  • 9
  • 21
7
votes
2 answers

How to create a computed property in Data Services (OData)?

I am creating an OData service with WCF Data Services using an EDMX. How can I create a computed property for an entity type, so that its value gets computed in the service (C#) and does not come from the database? The value of this property is…
Fabrice
  • 3,094
  • 3
  • 28
  • 31
7
votes
1 answer

Fails to Scaffolding on project which has a reference to edmx

I have Demo solution with two projects like this : I have installed T4Scaffolding.Install-Package T4Scaffolding I have added a reference of AdventureWorksModel to my RepoLayer Project and install EF6 . Now when i try to run the following command…
Anyname Donotcare
  • 11,113
  • 66
  • 219
  • 392
7
votes
1 answer

Modifying the edmx template file

I'm using EF 6.02 with Visual Studio 2013. What I need to do is to be able to modify the Model.Context.tt file (generated when creating or modifying the EDMX file) to place certain attributes and namespaces in the generated POCO classes so I don't…
sagesky36
  • 4,542
  • 19
  • 82
  • 130
7
votes
1 answer

Where to find .csdl, .ssdl, and .msl files in Entity Framework 4.0 code first?

I want to run tests with Effort and to do that I need to specify a connectionstring that also contains a reference to .csdl, .ssdl, and .msl files. The (non-working) connectionstring looks like this now: