Questions tagged [linq-to-entities]

This tag is for questions about LINQ to Entities, which means LINQ queries using the ADO.NET Entity Framework. Note that this is different than LINQ to SQL or other LINQ providers.

This tag is for questions about LINQ to Entities, which means LINQ queries using the ADO.NET Entity Framework. Note that this is different than LINQ to SQL or other LINQ providers.

Related Links

6860 questions
3
votes
1 answer

Has Microsoft Fixed Linq to Entities Performance Problems in .NET 4.0?

I feel pretty comfortable with the entity framework now. I have been reading some performance articles on the Linq to Entities performance issues. Are these issues still present in .NET 4.0?
user161433
  • 4,419
  • 5
  • 32
  • 55
3
votes
2 answers

What is the difference between LINQ to Entities and the Entity Framework?

Simple question: What is the difference between LINQ to Entities and the Entity Framework? Up until now, I thought that both were different names to describe the same query, but I'm starting to get the feeling that it's not.
Daniel T.
  • 37,212
  • 36
  • 139
  • 206
3
votes
2 answers

Load sets of records, 4 items at once

I've a question about loading sets of records for a 'slideshow' on my homepage. I'm using ASP.NET, LINQ and C#. This is the markup of the repeater:
Daniel Plomp
  • 174
  • 1
  • 12
3
votes
2 answers

Data Validation with MVVM-Light WPF and Linq to Entity Framework

I think I have read every article google returns when I search wpf mvvm-light data validation and I dont know which way to go. I am aware of josh smith, Karl Shifflett's, and MVVM LIGHT's own demo techniques for data validation. What I see is that…
J King
  • 4,108
  • 10
  • 53
  • 103
3
votes
1 answer

LINQ to Entities does not recognize the method

LINQ to Entities does not recognize the method... Guys, I'm sorry. I realize that this issue has been brought up by hundreds of people already. Unfortunately I have been reaching my mental boundaries already and none of the answers I found seemed to…
Ingmar
  • 1,525
  • 6
  • 34
  • 51
3
votes
1 answer

linq to entity: linq query performance optimization

i'm using EF 4.4.20627.0 with MySQL 5.6, MySQL .net connector version 6.6.4 i have a method like this, which generated sql is very very slow(needs more than 1 min) private List GetPagedNews(int pagenum, int pagesize, …
Scott 混合理论
  • 2,263
  • 8
  • 34
  • 59
3
votes
3 answers

Some part of your SQL statement is nested too deeply. Rewrite the query or break it up into smaller queries

I have the folloiwng method inside my asp.net mvc web application and i am using Entity framework as the data access layer:- public IEnumerable getcontactinfo(long[] id) { var organizationsiteids = (from…
John John
  • 1
  • 72
  • 238
  • 501
3
votes
1 answer

Lambda Expression for LINQ Select Items

I have this code var list = _db.Projects.Where(item => item.Loc =="IN").Select(p => new {id=p.Id, title=p.Title,pc=p.PostalCode }); Project table having lot of columns, i need to query required columns dynamically and load from database, not all…
Ramesh Bolla
  • 372
  • 1
  • 3
  • 21
3
votes
3 answers

Optimize linq query for performance(now takes 12-15seconds, need 3seconds)

Edit: I need help to rewrite these linq querys to SQL querys for highest possible performance. I have a table with about 10 million rows. It consists of 7 columns including Id. First is Id, then three keys to "TradeObjectModel", finally three…
Magnus Karlsson
  • 3,549
  • 3
  • 31
  • 57
3
votes
1 answer

Linq Expression building for Entity Framework involving complex object

I am using Entity Framework version 4. I need to compare a large (~1 million record) SQL Server table to a longish (~2000) array of complex objects returned from a web service. Five different properties need to be compared to determine whether an…
Ann L.
  • 13,760
  • 5
  • 35
  • 66
3
votes
1 answer

Selecting values from IQueryable with IsNullOrWhitespace check

I am trying to do the following with a IQueryable expression: (from Person p in s select new { label = p.FirstName + " " + (string.IsNullOrWhiteSpace(p.MiddleName) ? p.MiddleName + " " : "") + p.LastName, …
TheVillageIdiot
  • 40,053
  • 20
  • 133
  • 188
3
votes
3 answers

IQueryable<>.ToString() too slow

I'm using BatchDelete found on the answer to this question: EF Code First Delete Batch From IQueryable? The method seems to be wasting too much time building the delete clause from the IQueryable. Specifically, deleting 20.000 elements using the…
Juliano
  • 2,402
  • 1
  • 20
  • 22
3
votes
2 answers

How to query associations in Linq to Entity framework in .NET Ria Services

I have just started with Linq and Linq to Entity Framewok. On top of that with the .NET Ria services. My problem is that I have 2 tables Folder and Item with a many to many relationsship using a third "connection" table FolderItem like…
Magnus Johansson
  • 28,010
  • 19
  • 106
  • 164
3
votes
5 answers

Linq to Entities Select Distinct

I'm not sure what I'm missing but I've been thrashing at this one all afternoon. I have a Sql Server view of Companies which looks like this: CompanyId varchar(30) NOT NULL CompanyName varchar(100) NOT NULL CompanyPriority int NULL ConfigItem int…
Nick
  • 4,115
  • 10
  • 45
  • 57
3
votes
2 answers

What is the role of the Include method

I am trying to learn LINQ for a project. But I am a little confused by the Include method. What is it used for? What is the difference between the following two initializations of the album variable? var album =…
ankit0311
  • 735
  • 3
  • 10
  • 20