How to write LINQ statement for XmlAttributeCollection?

I always confuse AsQueryable, AsEnumerable. When should I use them? Should I use AsQueryable to create a LINQ statement to create a filter according to the xml or AsEnumerable attribute?

[Serializable] public class LogHandler : IConfigurationSectionHandler { public object Create(object parent, object configContext, XmlNode section) { XmlAttributeCollection v = section.Attributes; } } 
+4
source share
1 answer

The main difference is that the extension methods defined for IQueryable accept Expression objects instead of Func objects, that is, the delegate that it receives is an expression tree instead of a method to call. IEnumerable is great for working with in-memory collections , but IQueryable allows you to use a remote data source , such as a database or web service.

+2
source

Source: https://habr.com/ru/post/1403893/


All Articles