I am using LINQPad to create LINQ queries in an application that I am expanding.
I noticed that in loaded LINQ in Action samples, for example. example 4.04, intellisense shows the "Books" class, but I donβt see any links or using the "in the LINQPad tool, here is an example:
List<Book> books = new List<Book>() { new Book { Title="LINQ in Action" }, new Book { Title="LINQ for Fun" }, new Book { Title="Extreme LINQ" } }; var titles = books .Where(book => book.Title.Contains("Action")) .Select(book => book.Title); titles.Dump();
In "LinqBooks.Common," Book.linq business objects "is a class that appears to be defined:
public class Book { public IEnumerable<Author> Authors {get; set;} public String Isbn {get; set;} public String Notes {get; set;} public Int32 PageCount {get; set;} public Decimal Price {get; set;} public DateTime PublicationDate {get; set;} public Publisher Publisher {get; set;} public IEnumerable<Review> Reviews {get; set;} public Subject Subject {get; set;} public String Summary {get; set;} public String Title {get; set;} public String Test {get; set;} public override String ToString() { return Title; } }
But how does it work so that I can copy in my classes and use LINQPad to quickly create LINQ statements that can then be copied back to my application?
c # linq linq-to-objects linqpad
Edward Tanguay Aug 03 '09 at 12:15 2009-08-03 12:15
source share