Questions tagged [ado.net-entity-data-model]

Covers the Entity Data Model-part of ADO.NET

Covers the Entity Data Model-part of ADO.NET

505 questions
2
votes
2 answers

Entity Sql for a Many to Many relationship

Consider two tables Bill and Product with a many to many relationship. How do you get all the bills for a particular product using Entity Sql?
2
votes
1 answer

Server Error in '/' Application

I have a standard ASP.NET 4 web site which uses the Entity Framework. It seems at random intervals, I get fatal errors. Refreshing the page works, but I know it's not a problem with the database. The exception seems to be caused by the entity…
Echilon
  • 10,064
  • 33
  • 131
  • 217
2
votes
1 answer

OData / WCF Data Services / EDM - Mapping to disparate data

I'm researching OData as a RESTful interface for a database. The data is structured in a very unusual way and normal tables and rows do not apply, in fact, some stuff just exists in in-memory collections and objects. Can I build my own arbitrary…
2
votes
1 answer

What steps are needed to use an Entity Framework model with a MySQL server?

I've added and designed an ADO.NET Entity Data Model (.edmx) and have generated the corresponding DDL Script (.edmx.sql). When I was using SQL Server 2008, all I had to do was connect to it via the Transact-SQL Editor toolbar and execute the SQL.…
dlras2
  • 8,416
  • 7
  • 51
  • 90
2
votes
1 answer

How to name relationships in ado.net data model, mvc 5 c#

I have a model in my mvc 5 website, I use database first approach. In some tables I have more than one columns referencing the same table. When the data model scaffolds, it appends numbers to the relationship names, is there a way I can give it a…
2
votes
0 answers

Add primary key [Key] to ADO.NET generated table classes

I'm using the ADO.NET Entity Data Model (EF Designer from database), which will generate the following class from my database table "customer": namespace WebApp1.Models { using System; using System.Collections.Generic; public partial…
2
votes
1 answer

Building a SSRS 2008 off an EDM

Can someone please outline the process of building a SQL Server Reporting Services 2008 report based on a ADO.Net Entity Framework Entity Data Model? If you know of any example, please point me to it. Thank you!
2
votes
1 answer

Generating Entity Classes using edmgen

I have a edmx file created using the entity entity framework model. Whenever I make some changes in the edmx(Like removing a column from the entity), I would like to generate the entity classes(Designer.cs). I know I can do this by right clicking…
KhanS
  • 1,167
  • 2
  • 12
  • 27
2
votes
2 answers

Is there any way to get Function Import support while using DbContext Generator?

I am trying to use the new-ish Entity Framework 4.1 DbContext Generator because it generates very clean POCO classes for all of the entities, and it uses the DbContext API instead of the ObjectContext API. The problem I am having is that there…
samandmoore
  • 1,221
  • 2
  • 15
  • 23
2
votes
1 answer

How to change schema databases with entity framework

The scenario basically is that I need a domain model to use in my program but to connect with different vendor databases containing ofcourse different schemas. Is it possible to change manually the xml SSDL file? maybe its better to create a data…
2
votes
2 answers

Too slow open connection to SQL Server on the first application startup

In my WPF4 desktop application I'm using connection to SQL Server 2008 R2 via ADO.NET Entity Data Model (edmx) and I payed attention, that when I start application for the first time (cold start) it takes too long time (about 10 sec) until…
Mike
  • 14,010
  • 29
  • 101
  • 161
2
votes
1 answer

Do we need DataContract attribute on POCO classes in Ado.net entity Framework 2010

I read somewhere in stackoverflow itself that when we use POCO classes for WCF contracts using Poco generator , we need not use DataContract and DataMember attributes.WCF do it auto for you? . I don't know how it manages this. I created a sample…
Kunal
  • 1,913
  • 6
  • 29
  • 45
2
votes
2 answers

Why would I be getting "The member with identity 'ReturnValue' does not exist in the metadata collection" error?

Im setting up an OData provider in visual studio. The error that im receiving really doesnt have anything to do with OData side of things. I have a table type in my ado entity data model and whenever I try to insert a record into this table i get…
MattyD
  • 185
  • 1
  • 3
  • 14
2
votes
1 answer

How to get to Foreign keys in the ADO.NET entity model?

I have 3 tables (and corresponding entities in the entity model) Game: Id - primay key ... other columns Player: Id - primary key ... other columns GamePlayer (a player can participate in many games) GameId --> foreign key from Game PlayerId -->…
Shankar
  • 1,634
  • 1
  • 18
  • 23
2
votes
3 answers

ADO.NET Entity Framework SaveChanges is not working

I have a .NET 4 WinForms app that uses the ADO.NET Entity Framework. Some code that was working perfectly has decided to stop working and although I've tried to figure out what changed that could cause this, I am stumped. This code looks perfectly…