var planEmployees = this.DB .Query("WHERE LeavePlanId=@0", p.Id) .ToList(); //Did a ToList() to realize this query // Same as it was earlier