LINQ
One of my colleagues Mehfuz Hossain developed a wonderful open source project which allows you to query Flickr photos by LINQ, also lets you insert, delete photos directly to/from Flickr. You wonder how to extend LINQ in such an amazing way? It’s easy by writing your own custom LINQ provider, which was not-so-easy until he came up with another handy open source project named LINQ Extender. He did all the expression parsing stuff to ease our pain. Now you can make your own LINQ to Anything using this...
In LINQ to SQL, the data model of a relational database is mapped to an object model expressed in the programming language of the developer. When the application runs, LINQ to SQL translates into SQL the language-integrated queries in the object model and sends them to the database for execution. When the database returns the results, LINQ to SQL translates them back to objects that you can work with in your own programming language. You may want to make a data access layer that separates the data...
The following works fine in LINQ, because an array implements IEnumerable <T>. string[] tokenArray = new string[2] { "Hello", "World" }; var tokens = from token in tokenList select token; foreach (var item in tokens) Console.WriteLine(item); But, the collections which do not implement IEnumerable<T> or IQueryable, can not be iterated in LINQ in the same way. To achieve the same, make use of a simple casting trick such as: ArrayList tokenList = new ArrayList(); tokenList.Add("Hello");...