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
3
votes
1 answer

Updating models from database in Entity Framework 6.0

I'm developing a Web API Service (in Visual Studio 2013), and I've added, in my solution, ADO.NET Entity Data Model (Database First). All the tables I've included, are correctly created in my edmx diagram. Then I've made some changes: I've added two…
3
votes
2 answers

Setting fetch size in entity framework

I am converting ado.net code to use EF. In my ado.net code i set dataReader.FetchSize = command.RowSize * 1000 and that dramatically improves performance over the default fetch size . When I convert my code to EF, the performance is on par to…
Andrey
  • 20,487
  • 26
  • 108
  • 176
3
votes
1 answer

Linq to Entities "does not recognize the method ... method, and this method cannot be translated into a store expression."

I have a problem. I create a Data Entity Model in Visual Studio. And in Linq; Guid RtuDataId = db.RtuData.Where(x => x.CommunicationUnit.Id == new Guid(ID)) .OrderByDescending(x => x.ReadOn) .LastOrDefault().Id; I get error ; does not…
user2962228
  • 41
  • 1
  • 3
3
votes
1 answer

MVC 4 Model in Separate Class Library Assembly (using EF 5)

I have a class library which contains all of my Entity Framework code. I'm developing an solution that involves several sub-projects, including an ASP.NET MVC project. My model has been separated into a separate assembly because I need to use it…
3
votes
1 answer

Entity Data Model Stored Procedure error - entity command execution exception was unhandled

Firstly, I checked this page but It doesn't seem to help me. I'm using this edmx file. Here is my code sample: private void btnSil_Click(object sender, EventArgs e) { Int64 isbn =…
Burak Karakuş
  • 1,368
  • 5
  • 20
  • 43
3
votes
2 answers

ASP.NET MVC with Model in Separate Assembly

I currently have a .NET solution I'm developing that involves several sub-projects, including an ASP.NET MVC project. My model has been separated into a separate assembly because I need to use it from the various other projects in the solution. My…
David Pfeffer
  • 38,869
  • 30
  • 127
  • 202
3
votes
1 answer

ADO.NET Entity Data Model doesn't update Entities

I'm using MySQL .NET Connector in my ASP.NET MVC project. The connection works fine. However, after creating a ADO.NET Data Model from my MySQL database (with "Update Model from Database") for the first time, each time I change the database in any…
3
votes
2 answers

Forced usage of stored procedures with ADO.NET Entity Framework

I would like to have your advice. I'm now developing a small WPF client application using C#, bindings, ADO.Net Entity Framework, ODP.net and an Oracle database. The application is a small one, two XAML screens, about 15 tables. I was developing…
user2409496
3
votes
1 answer

Entity Framework won't resolve PK-FK relationship with composite primary key?

I'm trying to set up an EDM on an existing SQL Server infrastructure, and came across a problem. The EDM will not resolve a PK-FK relationship to a composite foreign key. My DB table structure looks something like this (names changed to protect the…
3
votes
1 answer

Selecting Data from Different Databases

I have two DB's and an application that gets/sets data using an Entity Data Model in VS 2010. I do my full stored procedure in DB(A) and then use the EXEC statement in DB(B) to return the data. The data returns fine and is correct, but whenever I…
Melanie
  • 584
  • 2
  • 11
  • 31
2
votes
2 answers

Stuck with "The EntityCollection has already been initialized." Error

Tool: Visual Studio 2010 Language: C# I have just started learning Entity Framework,I'm stuck in a problem,whenver I used Code#1 it works fine but whenever I use CODE#2,I get error (posted below) Title: InvalidOperationException was unhandled by…
2
votes
1 answer

EF 4.1 DBContext and Navigation Properties

We've been using EF STEs for a while, but our application has grown quite a bit and we decided to sue the new 4.1 DbContext so we can "evolve" a separate business layer on top of our data layer without having to use different types for it. In the…
2
votes
1 answer

LINQ to Entities - WHERE clause to exclude Partially Shipped Orders in my example

I have an Order table. An Order can have multiple items in it, with each item shipping at different times. I want to get the list of all Orders which excludes partially shipped or orders. In other words, I need to get the list of all orders that are…
FMFF
  • 1,652
  • 4
  • 32
  • 62
2
votes
2 answers

Can't add tables in Entity Model without Primary key

I have a problem in using Entity data model. I'm unable to add a table in entity model that has no primary key. The same situation is with the table that has composite key.
2
votes
1 answer

how to use postgresql with ado.net entity framework in asp.net mvc 2

In my current project, we are using visual studio 2008, sql server 2008, mvc 2 with ado.net entity framework (ado.net entity data model), linq and developing a web application. This application working fine. Now, we want to use PostgreSQL which is…
Harsha
  • 1,161
  • 4
  • 18
  • 38