المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : What is the better approach between IQueryable and IEnumerable ?



C# Programming
02-15-2011, 02:52 PM
Hi,

I am using LINQ to SQL in my Data Access Layer. I learned that I should not expose IQueryable, rather I should convert the result of IQueryable object to IEnumerable by calling ToList() method. Would you please tell me If IQueryable is better for memory / performance or what are the factors should be related to this decision ?