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
110
votes
5 answers

How do I find a specific table in my EDMX model quickly?

I was wondering if anyone knows a quicker way to find a table in the EDMX model than just scrolling through the diagram and looking for the thing. Our database has around 50 tables in it and when I'm looking for a specific one it's just a chore to…
monkeymindllc
  • 1,411
  • 2
  • 9
  • 12
70
votes
8 answers

Error 3002: Problem in mapping fragments | c# linq to entities

I have a console application and what I'm trying to do is that every time the appllication runs, the date and time is sent to a table within my database. The table structure is like so: FTPRuns ID int Last Run datetime Simple enough. I've…
109221793
  • 16,477
  • 38
  • 108
  • 160
68
votes
3 answers

Error: "The specified LINQ expression contains references to queries that are associated with different contexts"

I am receiving the error shown in the title from a LINQ query that includes two tables from two different edmx files. Here is the query: var query = (from a in db1.Table1 join b in db1.Table2 on a.Id equals b.Id orderby…
Ashiq A N
  • 776
  • 1
  • 8
  • 16
56
votes
6 answers

How do you update an edmx file with database changes?

I have an edmx file and I changed a table in my database. I know that there is an "Update Model from database" wizard, however in many cases this is useless. For example if I change a field from non null to nullable or if I remove fields the update…
dtc
  • 10,136
  • 16
  • 78
  • 104
49
votes
13 answers

Error 3004: Problem in mapping fragment starting at line

I have this error when I build my Web Service: Error 3004: Problem in mapping fragment starting at line 323: No mapping specified for properties JE_TRN_HS.JE_HDR_HSJE_HDR_KEY. Entity is type [TESTCPModel.JE_TRN_HS This is what happend. I…
49
votes
2 answers

Create a Dropdown List for MVC3 using Entity Framework (.edmx Model) & Razor Views && Insert A Database Record to Multiple Tables

After reading 100's of articles on here about how to create a DropDown List in MVC 3 with Razor Views, I could not find one that fit my case. Situation: I am ultimately trying to create a View to Add an Employee to a Database. Here is an image of…
42
votes
7 answers

Update wizard not responding

Every time I need to update my emdx from database, the update wizard takes an incredible amount of time to do so rendering itself as not responding once you hit the finish (as finish the update) button. I use Visual Studio 2015 and LocalDb SQL…
Santhos
  • 3,348
  • 5
  • 30
  • 48
35
votes
11 answers

No Entity Data Model (EDMX) Template with Visual Studio 2010 SP1 & ADO.NET Entity Framework 4.1

I'm having a lot of issues with the templates of Visual Studio 2010 SP1 & ADO.NET Entity Framework 4.1 I noticed that other people had these problems, and asked similar questions, but I don't think they gave enough information to make it…
34
votes
4 answers

Tool to convert Entity Framework EDMX to Code First

Is there a tool to convert an edmx into code-first? I know there was talk of one appearing in a CTP a while back, but I can't find any updates relating to this. There's a guy on the MSDN forums who has written his own (not available yet), but…
SturmUndDrang
  • 1,876
  • 5
  • 27
  • 47
33
votes
15 answers
33
votes
5 answers

Entity Framework Merge Nightmare

We've adopted the Entity Framework and we're finding that when multiple people make isolated changes in their individual source control branches, there are massive conflicts when they come together in a merge, resulting in broken model files. We're…
ctorx
  • 6,841
  • 8
  • 39
  • 53
33
votes
9 answers

Entity Framework Migrations Error - Sequence contains no elements

command: add-migration blahblah -verbose error: Sequence contains no elements I did a few things before getting this error. I made a change to my code-first model but did not runadd-migration yet. Then I added an EDMX model to play around with an…
32
votes
11 answers

Entity Framework - Already Defined

I have a problem with an EDMX file which I've never encountered before. Seemingly randomly when the site is running or I'm debugging, the EF will bomb out and complain that everything is re-defined. I have to restart the app pool and re-attach the…
Echilon
  • 10,064
  • 33
  • 131
  • 217
30
votes
18 answers

Entity data model designer won't open the edmx file

The strange thing is, it was working fine a few days ago. I added a new column to a table and was going to update the model through the designer and now it says "The Entity Data Model Designer is unable to display the file you requested. You can…
Legion
  • 3,922
  • 8
  • 51
  • 95
22
votes
7 answers

Entity Framework edmx click on diagram very slow

Background first: I have a database-first EF6 model in Visual Studio 2015 (latest nuget 6.1.3 pointing to a local SQL Server 2014 SP1 Express database) on a Windows 10 Pro laptop. After I upgraded from Windows 8.1 and Visual Studio 2013. I also…
1
2 3
52 53