Product Reviews

Search Collections with ComponentOne LiveLINQ

LiveLINQ speeds up LINQ queries against in-memory collections by an order of magnitude -- but before you buy it, make sure you have the problems it solves.

ComponentOne LLC claims that its LiveLINQ product will speed up queries by orders of magnitude -- and, based on my testing, that's true. The tool works equally well in C# and Visual Basic, though all the provided sample code is in C#.

What the LiveLINQ libraries provide are some new extension methods for LINQ queries, chiefly the AsIndexed method, as used in this example:

var res = from o in nw.Order_Details. 
             AsIndexed()
           where o.Discount.Indexed() 
             == .05
	        select o;

Assuming that the collection has more than a few objects in it, the first time you run this query, you'll get your results back in about half the time as you would without LiveLINQ. Subsequent queries against the Discount method will run in one-tenth the time. Really.

LiveLINQ won't work with every collection that LINQ will work with. You can't use the LiveLINQ extensions on a List, for instance. However, LiveLINQ will work with DataSets and their related objects, the LINQ to XML collections, BindingList (or anything that implements the IBindingList interface), ObservableCollection and others.

LiveLINQ also provides a new collection called IndexedCollection that provides a database-type View. For instance, you can run a LINQ query against an Indexed-Collection and bind the result to some Data-View. If you later add items to the collection that meet the criteria for the query, the DataView will automatically display the new entries.


[Click on image for larger view.]
Figure 1. LiveLINQ comes with an extensive set of examples, including several that demonstrate how to work with DataSets (though not with the Entity Framework).

Other Caveats
ComponentOne says on its Web site that LiveLINQ works with the Entity Framework, but that's all it says. You should be aware, for instance, that a LiveLINQ View isn't live relative to data in the database, just to in-memory changes. LiveLINQ doesn't follow typical component pricing: It costs $1,000 per developer without the Platinum Support package (discounts are available). This is $200 more than the entire ComponentOne

ASP.NET AJAX component package. But, if you need to solve response-time problems with large object collections, or hope to improve scalability by using caching, LiveLINQ looks like an outstanding solution.

LiveLINQ

ComponentOne LLC
Web:
componentone.com
Phone: 800-858-2739
Price: $1,000 (single developer without Platinum Support)
Quick Facts: Extensions to LINQ that speed up queries through indexing and providing database-like views.
Pros: Makes LINQ queries against collections such as DataSets run an order of magnitude faster.
Cons: Doesn't work with all Microsoft .NET Framework collections; pricing is a little steep.



About the Author

Peter Vogel is a system architect and principal in PH&V Information Services. PH&V provides full-stack consulting from UX design through object modeling to database design. Peter tweets about his VSM columns with the hashtag #vogelarticles. His blog posts on user experience design can be found at http://blog.learningtree.com/tag/ui/.

comments powered by Disqus

Featured

  • Mastering Blazor Authentication and Authorization

    At the Visual Studio Live! @ Microsoft HQ developer conference set for August, Rockford Lhotka will explain the ins and outs of authentication across Blazor Server, WebAssembly, and .NET MAUI Hybrid apps, and show how to use identity and claims to customize application behavior through fine-grained authorization.

  • Linear Support Vector Regression from Scratch Using C# with Evolutionary Training

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the linear support vector regression (linear SVR) technique, where the goal is to predict a single numeric value. A linear SVR model uses an unusual error/loss function and cannot be trained using standard simple techniques, and so evolutionary optimization training is used.

  • Low-Code Report Says AI Will Enhance, Not Replace DIY Dev Tools

    Along with replacing software developers and possibly killing humanity, advanced AI is seen by many as a death knell for the do-it-yourself, low-code/no-code tooling industry, but a new report belies that notion.

  • Vibe Coding with Latest Visual Studio Preview

    Microsoft's latest Visual Studio preview facilitates "vibe coding," where developers mainly use GitHub Copilot AI to do all the programming in accordance with spoken or typed instructions.

  • Steve Sanderson Previews AI App Dev: Small Models, Agents and a Blazor Voice Assistant

    Blazor creator Steve Sanderson presented a keynote at the recent NDC London 2025 conference where he previewed the future of .NET application development with smaller AI models and autonomous agents, along with showcasing a new Blazor voice assistant project demonstrating cutting-edge functionality.

Subscribe on YouTube