Top "Linq-to-entities" questions

This tag is for questions about LINQ to Entities, which means LINQ queries using the ADO.

How to compare only date components from DateTime in EF?

I am having two date values, one already stored in the database and the other selected by the user using …

c# linq entity-framework linq-to-entities datetime-comparison
The cast to value type 'Int32' failed because the materialized value is null

I have the following code. I'm getting error: "The cast to value type 'Int32' failed because the materialized value …

c# .net entity-framework linq-to-entities
How do I get the max ID with Linq to Entity?

I have a table User which has an identity column UserID, now what is the correct Linq to Entity line …

c# linq entity-framework linq-to-entities
LINQ to Entities does not recognize the method

I'm getting the following error when trying to do a linq query: LINQ to Entities does not recognize the method …

.net linq entity-framework linq-to-entities specification-pattern
Linq where clause compare only date value without time value

var _My_ResetSet_Array = _DB .tbl_MyTable .Where(x => x.Active == true && x.DateTimeValueColumn <= DateTime.Now) .…

c# entity-framework datetime linq-to-entities compare
SQL to Entity Framework Count Group-By

I need to translate this SQL statement to a Linq-Entity query... SELECT name, count(name) FROM people GROUP by name

sql entity-framework linq-to-entities count group-by
Like Operator in Entity Framework?

We're trying to implement the "LIKE" operator in Entity Framework for our entities with string fields, but it doesn't appear …

.net sql-server entity-framework linq-to-entities
LINQ to Entities how to update a record

Okay, so I'm new to both EF and LINQ. I have figured out how to INSERT and DELETE but for …

c# linq entity-framework entity-framework-4 linq-to-entities
"A lambda expression with a statement body cannot be converted to an expression tree"

In using the EntityFramework, I get the error "A lambda expression with a statement body cannot be converted to an …

c# linq entity-framework linq-to-entities
Cannot implicitly convert type 'System.Linq.IQueryable' to 'System.Collections.Generic.IList'

I have a method: public DzieckoAndOpiekunCollection GetChildAndOpiekunByFirstnameLastname(string firstname, string lastname) { DataTransfer.ChargeInSchoolEntities db = new DataTransfer.ChargeInSchoolEntities(); DzieckoAndOpiekunCollection result = new …

c# .net linq exception-handling linq-to-entities