var test1 = DB.UnAuthPriorityLevelTypes.AsEnumerable();
var test2 = DB.UnAuthPriorityLevelTypes.AsQueryable();
var test3 = DB.UnAuthPriorityLevelTypes.ToList();
var test4 = DB.UnAuthPriorityLevelTypes.AsEnumerable();
var test5 = DB.UnAuthPriorityLevelTypes.AsQueryable();
In the above five statements, if I look at the count of values in test1 and test2 it's 0, but test3, test4, test5 have the count value of 3, which was supposed to be the case. Why?
Update:
Even though test1 shows as 0 results , i m able to loop through it successfully and get the values I thought the problem is due to Lazy Loading behaviour of EF but i tried to disable it and ran it but no go
if(DB.Configuration.LazyLoadingEnabled)
DB.Configuration.LazyLoadingEnabled = false;