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
11
votes
2 answers

does Visual Studio 2015 include .edmx support?

Does Visual Studio 2015 include .edmx support? I have a project that includes an .edmx data model and double-clicking it in VS2015 just opens the XML editor. There's no DbContext generator option in the file->new dialog.
11
votes
3 answers

The selected stored procedure returns no columns, when i try to import my stored procedure inside my asp.net mvc

I have the following stored procedure inside my SQL server 2008 r2 & asp.net mvc web application: USE [ITSERres] GO /****** Object: StoredProcedure [dbo].[AdvanceSearchSP] /* Script Date: 08/04/2014 16:21:12 ******/ SET ANSI_NULLS ON GO SET…
John John
  • 1
  • 72
  • 238
  • 501
11
votes
3 answers

Entity Framework 4 (using EDMX), how to add a field into to model that DB does not have the field actually

I need to add a field into model that Database does not have the field actually. Because, firstly I tried to add the field into Entity class only. public partial class Weborder { (Auto Generated) public int orderno {get; set;} . . . (Add…
Expert wanna be
  • 10,218
  • 26
  • 105
  • 158
10
votes
2 answers

Entity Framework: Naming conventions/suggestions for EDMX file and entity class?

I´ve not had much contact with Entity Framework yet and therefore I´d like to hear some guys with experience. I´ve got an MVC project and my DataAccess lies in a different project where I want to place my EDMX file. So how would I like to name this…
timmkrause
  • 3,367
  • 4
  • 32
  • 59
10
votes
2 answers

How to prevent from DataAnnotations Attributes being deleted in DataBase First Model

I have my asp.net mvc 3 application with entity framework and i used the Database First model to set it up. My Steps below: 1. Genarated a database with tables 2. Created ADO.NET Entity Data Model file (.edmx) and imported the tables 3. inside…
python
  • 2,677
  • 3
  • 17
  • 15
10
votes
3 answers

EF4: Get the linked column names from NavigationProperty of an EDMX

I am generating POCOs (lets say they are subclasses of MyEntityObject) by using a T4 template from an EDMX file. I have 3 entities, e.g.: MyTable1 (PrimaryKey: MyTable1ID) MyTable2 (PrimaryKey: MyTable2ID) MyTable3 (PrimaryKey: MyTable3ID) These…
user432219
10
votes
1 answer

Updating model in EF Database First project

I've inherited a project which uses Entity Framework Database First. I'm trying to work out how to update the model classes when I update the database but I can't figure it out. What I've done so far is added a column called Test to a table in the…
Sachin Kainth
  • 45,256
  • 81
  • 201
  • 304
9
votes
2 answers

Entity Framework 1to1 relationship via association table not working in EDMX

I have the following tables in SQL Server database Which has a 1-1 association table (FooBar) which has unique indexes on corresponding FooId, BarId, and the primary key is (FooId, BarId). To be clear FooBar does not allow any FooId (due to unique…
Jim
  • 4,910
  • 4
  • 32
  • 50
9
votes
1 answer

Visual Studio 2013 error creating an EDMX file

In Visual Studio 2013 (Update 2, and later Update 4), using Entity Framework 6.1.2, I am having issues when creating an EDMX file. When creating the file, I add a new item, select "ADO.NET Entity Data Model", and regardless of whether I create an…
9
votes
2 answers

Visual Studio 2013 - Entity Framework - Update Wizard not responding

I'm trying to refresh my EDMX through the Update Wizard, I've waited around 30 mins but nothing happens and it stops responding. I only have around 23 tables, which shouldn't be too much. I've tried these and none are working: Restart VS…
nic
  • 2,125
  • 1
  • 18
  • 33
9
votes
1 answer

EF6 code first: How to load DbCompiledModel from EDMX file on startup?

I want to reduce startup time in EF6 by caching the DbCompiledModel to disk. It's easy to write the EDMX file for a DbContext: EdmxWriter.WriteEdmx(myDbContext, XmlWriter.Create(@"C:\temp\blah.xml")) And it's easy to pass a DbCompiledModel to the…
Brendan Hill
  • 3,406
  • 4
  • 32
  • 61
9
votes
3 answers

How to get the maximum length of a string from an EDMX model in code?

I've created an EDMX object from a database I'm programming against. I need to get input from a user and save it to a row in the database table. The problem is that I need to limit the length of input strings to the width of the corresponding…
Vivian River
  • 31,198
  • 62
  • 198
  • 313
9
votes
4 answers

MappingException Edm.String not compatible with SqlServer.varbinary

I am having a difficult time resolving a silly mapping problem. Basically what is going on is that I have a field in a sql db table that is a varbinary for the purposes of security (encryption and decryption). All that stuff is all well and good but…
Schanckopotamus
  • 781
  • 2
  • 6
  • 20
8
votes
3 answers

Missing associations when building a model from existing SQL server database

Edit: the issue is solved in the newer versions of EF. At least that's what I assume since I recently created a new project and followed the same steps and everything went fine! Thanks for your comments and helps. I leave the original question,…
AlefSin
  • 1,086
  • 9
  • 20
8
votes
1 answer

Entity framework - create the csdl, ssdl and msl files

I work with EF 4 (not with Self-tracking entities currently). I've added some columns (non of them is a key and all of the are nullable) to one of my entities, and got the Number of members in conceptual type does not match with number of members on…
Noich
  • 14,631
  • 15
  • 62
  • 90
1 2
3
52 53