Thursday, 15 August 2013

Will linq bring back all records from a stored procedure call, and then filter?

Will linq bring back all records from a stored procedure call, and then
filter?

Given the EF linq below, will all the records in the stored proc
usp_GetTestRecords() come across and then get filtered?
TestRecordsDBEntities dataContext = new TestRecordsDBEntities();
var tests = dataContext.usp_GetTestRecords();
var filtered = tests.Where(x => x.GroupId == groupId)
.OrderByDescending(y => y.Name)
.ToList();

No comments:

Post a Comment