• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
Show / Hide Table of Contents

Query Data in Cache with LINQPad

NCache provides integration with the popular .NET utility LINQPad to query cache data.

Important

Prerequisites to query NCache's objects in LINQPad:

  • The cache data being queried must be indexed.
  • LINQPad for NCache must be configured.

How to Query Data in Cache with LINQPad

To start writing LINQ queries in LINQPad:

  • Open up LINQPad and go to the Query tab.
  • Go to Language and select C# Statement(s) from the drop-down list.
  • You can now write your LINQ queries over the configured cache, and see the results in the same window.

To process queries in LINQPad, NCache LINQ Provider uses the NCacheContext class which further implements the IQueryable interface provided by the .NET framework. NCacheContext requires a valid cache name to process a query.

In the following code, it is assumed that ClusteredCache contains Product objects. A Product class LINQ object is created using NCacheContext, which is used to query the product that has ProductID == 12.

IQueryable<Product> product = new NCacheContext<Product>("ClusteredCache");

var result = from prod in product
             where prod.ProductID == 12
             select prod;

result.Dump();

LINQPad NCache Queries

See Also

Query Cache with LINQ
LINQ Reference for NCache

In This Article
  • How to Query Data in Cache with LINQPad
  • See Also

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top