Skip to main content

Questions tagged [linq]

Language Integrated Query (LINQ) is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages. Please consider using more detailed tags when appropriate, for example [linq-to-sql], [linq-to-entities] / [entity-framework], or [plinq]

14,069 questions with no upvoted or accepted answers
9 votes
0 answers
3k views

Unable to determine the serialization information for the expression error

I'm getting an Unable to determine the serialization information for the expression: (PlaceManager pm) => pm.FreePlaces.get_Item(index) error when trying to remove value from database (Mongo DB). ...
Yury Pogrebnyak's user avatar
8 votes
3 answers
6k views

Getting COUNT and SKIP TAKE in one operation with Linq to Entities

I have a data call in a Linq to Entities powered data access layer that is designed to make paged calls. In doing so, I need to select a subset of the data, say 50 rows, but also get the count of all ...
Wesley's user avatar
  • 5,595
8 votes
1 answer
684 views

DLR - Why isn't debug information showing up in my stacktrace?

First, I've read Making a CLR/.NET Language Debuggable, but am still having trouble implementing this. I've written a toy language that works by generating a Linq Expression, then calling ...
user avatar
8 votes
1 answer
3k views

Groovy 1.8 :: LINQ Applied

UPDATE 8/31/2011 Guillaume Laforge has nearly done it: http://gaelyk.appspot.com/tutorial/app-engine-shortcuts#query Looks like he's doing an AST transform to pull off the: alias as Entity bit. ...
virtualeyes's user avatar
  • 11.2k
7 votes
2 answers
262 views

Eliminate LET operator and SqlFunctions

Please consider this query: from r in ent.MyTable group r by new { r.EmployeeName, r.EmployeeID } into g let c = " (" + SqlFunctions.StringConvert((decimal?)g.Count()) + " )" select new { ...
DooDoo's user avatar
  • 13.3k
7 votes
1 answer
2k views

Using MSSQL 2016 "AT TIMEZONE" feature from Entity Framework?

How would one use the MSSQL 2016 AT TIMEZONE feature from Entity Framework? In other words, how to generate SELECT MyTimestamp AT TIME ZONE 'Central European Standard Time' FROM MyTable by LINQ in ...
Anders's user avatar
  • 93
7 votes
1 answer
339 views

Anglesharp - How to get ratings & reviews from a Yelp site?

I want to try my hand and webscraping. I've noticed that Anglesharp is pretty good for the .Net environment. I'm trying to get a list of all the descriptions and ratings from a yelp site and I don't ...
inquisitive_one's user avatar
7 votes
0 answers
2k views

Deadlock with entity framework & LINQ

I have a asp.net/mvc 3/entity framework 4.1 web application which access a class library to get look up table data. When I hit the website for the first time and try to load two different pages ...
user2244625's user avatar
7 votes
3 answers
4k views

The nested query is not supported. Operation1='UnionAll' Operation2='MultiStreamNest'

I have a Linq to Entities query of the following form: var x = from a in SomeData where ... some conditions ... select new MyType { Property = a.Property, ChildCollection =...
Tim Croydon's user avatar
  • 1,866
7 votes
1 answer
2k views

Generic c# Round Robin (partitioned/sorted) Queue

I often have the need to process a queue of items where no one user should be able to block the queue and the items in the queue should be processed in some order. I frequently write a class to do ...
powlette's user avatar
  • 1,800
6 votes
3 answers
2k views

How to translate TimeSpan calculations to SQL via LINQ

I'm having an entity with a TimeSpan property (Start) and an int (Duration in minutes) property. I want to perform a linq query that will fetch all the rows that apply to the following logic: Start &...
Dimitris's user avatar
6 votes
0 answers
2k views

Entity Framework cursor based pagination

How to efficiently implement cursor based pagination with EF? Traditionally Take and Skip solve the common way of do it, but for scenarios where data is added and removed frequently traditional ...
Andro Font's user avatar
6 votes
1 answer
3k views

Using Specification Pattern and Expressions in Entity Framework and Linq to Entities

I have a number of complex queries in a repository accesing a DB via Entity Framework / Linq-to-Entities. These queries, generally, are built up out of a number of non-trivial sub-queries. Generally ...
Graham's user avatar
  • 1,507
6 votes
1 answer
2k views

Mapping IQueryable where clause from DTO to Entity

I've got an OData WebAPI method as follows: // GET: odata/Employees [EnableQuery] public IQueryable<DTOs.Employee> GetEmployees() { return this.AttemptOperation(...
Dan Guisinger's user avatar
6 votes
0 answers
5k views

using Dbset.Add Versus using EntityState.Added

I am working on an asp.net mvc 5 with EF 6. and is there any differences between writing the following code , when Adding new object:- db.Students.Add(student); db.SaveChanges(); OR db.Entry(...
John John's user avatar

15 30 50 per page
1
2 3 4 5
938