Try Playground
Show / Hide Table of Contents

Configure LINQPad for NCache

NCache seamlessly integrates with LINQPad, a popular .NET utility for interactively querying SQL databases using LINQ and Lambda expressions, as well as writing C# without an IDE. With its dedicated LINQPad provider, NCache enhances data analysis by enabling seamless execution of LINQ queries. Integration is straightforward - just reference the NCache LINQPad provider along with the custom objects stored in NCache, ensuring that all queried objects are indexed.

Note

The following section has been implemented using LINQPad 5.

To configure LINQPad for NCache querying, follow the steps given below:

Step 1: Refer NuGet Package to Configure LINQPad

NCache provides LinqPad.NCache and Linq.NCache NuGet packages to configure LINQPad integration with NCache. To refer to these packages in LINQ, follow these steps:

  • Open up LINQPad and go to File -> New Query or Press Ctrl + N.

  • On the Query menu, click Reference and Properties or press F4 to add a reference. Query Properties wizard pops up.

LINQPad for NCache

  • In the Additional References tab, click on the Add NuGet… button to go to LINQPad NuGet Manager.

Add Nuget for LinqPad

  • In the search bar, type and search for LinqPad.NCache package. Click on the Add to Query button to install LinqPad.NCache NuGet package.

Show NuGet Add

Note

When you install LinqPad.NCache, it automatically installs Linq.NCache NuGet package as a dependency.

Add NuGet for LINQPad for NCache

  • Click Close to exit LINQPad NuGet Manager.

Step 2: Refer to Assembly for Searchable Attributes

Once you have successfully installed NCache NuGet packages for LINQ integration, you need to add a reference to the assembly containing the entities you want to search from the cache. To do this, follow these steps:

  • In the Additional References tab, click on the Browse button. This will open up a dialog box from where you can browse to the required assembly.

  • Select the assembly file and click on the Open button to add the assembly reference.

Add Query References for LINQPad for NCache

Step 3: Adding Required Assemblies and Namespaces

The last step in configuring NCache in LINQPad is to add the assemblies and namespaces required by NCache to successfully query cached data using LINQPad. Follow the steps provided below to understand how to provide these references:

  • Go to the Additional Namespace Imports tab from the Query Properties dialog box.

Add Another Default

  • From the top-right corner, click on the Pick from Assemblies link which will display the Assemblies and Namespaces sections.

Add Default

  • Choose Alachisoft.NCache.LinqPadIntegration.dll from the Assemblies section and then choose Alachisoft.LinqPadIntegration from the Namespaces section and click < Add Selected Namespaces.

Add LINQPad Integration Assembly in LINQPad for NCache

  • Similarly, perform the same steps for Alachisoft.NCache.Linq.dll by choosing it from the Assemblies section and Namespaces section.

Add Linq Assembly

  • Also, choose SampleData.dll, which contains entities that you want to cache, by performing the same steps.

Add SampleData Assembly in LINQPad for NCache

Note

It is suggested to click the Set as default for new queries button to persist references for all new queries.

  • Click OK.

See Also

Querying NCache Data in LINQPad
Search Cache with LINQ
LINQ Reference for NCache

In This Article
  • Step 1: Refer NuGet Package to Configure LINQPad
  • Step 2: Refer to Assembly for Searchable Attributes
  • Step 3: Adding Required Assemblies and Namespaces
  • 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