Linql.Client 1.0.0-beta.5012

This is a prerelease version of Linql.Client.
dotnet add package Linql.Client --version 1.0.0-beta.5012
                    
NuGet\Install-Package Linql.Client -Version 1.0.0-beta.5012
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Linql.Client" Version="1.0.0-beta.5012" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Linql.Client" Version="1.0.0-beta.5012" />
                    
Directory.Packages.props
<PackageReference Include="Linql.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Linql.Client --version 1.0.0-beta.5012
                    
#r "nuget: Linql.Client, 1.0.0-beta.5012"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Linql.Client@1.0.0-beta.5012
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Linql.Client&version=1.0.0-beta.5012&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Linql.Client&version=1.0.0-beta.5012&prerelease
                    
Install as a Cake Tool

Linql.Client

A C# Client for the Linql Language. Allows you to use your api as if it were an IQueryable.

Linql Overview

LinqlContext Context = new LinqlContext("https://localhost:8080");
LinqlSearch<DataModel> search = Context.Set<DataModel>();
string output = await search.Where(r => r.Boolean && r.OneToOne.Boolean).ToListAsync();

Installation

dotnet add package Linql.Client -v 1.0.0-alpha1

Basic Usage

Create a LinqlContext

LinqlContext Context = new LinqlContext("https://localhost:8080");

//Optional: Change TopLevel functions to be flat, instead of chained through .Next
Context.FlattenTopLevelFunctions = true;

Start a Query

LinqlSearch<MyModel> basicSearch = Context.Set<MyModel>();
LinqlSearch<MyModel> searchOne = basicSearch.Where(r => r.Integers.Contains(1));
LinqlSearch<MyModel> searchTwo = basicSearch.Where(r => r.Integers.Contains(2));

var results = await Task.WhenAll(
    searchOne.ToListAsync(),
    searchTwo.TwoListASync()
)

Defaults

The provided LinqlContext above has the following defaults:

  • Endpoint is set to {BaseUrl}/linql/{TypeName}
  • Ignores serializing default values
  • PropertyNames are case insensitive

Customization

To customize the LinqlContext, simply create your own derivation of the default LinqlContext.

using System.Text.Json.Serialization;
using Linql.Client;
using Linql.Core;
using NetTopologySuite.IO.Converters;

public class CustomLinqlContext : LinqlContext
{
    ///Override constructor to add GeoJson support and allow floating point literals. 
    public CustomLinqlContext(string BaseUrl) : base(BaseUrl)
    {
        var geoJsonConverterFactory = new GeoJsonConverterFactory();
        this.JsonOptions.Converters.Add(geoJsonConverterFactory);
        this.JsonOptions.NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals;

    }

    ///Instead of {baseurl}/linql/{TypeName}, set the endpoint as {baseurl}/TypeName
    protected override string GetEndpoint(LinqlSearch Search)
    {
        return $"{Search.Type.TypeName}";
    }
}

Full Example

Checkout our full example here.

Development

  • Visual Studio 2022 17.4
  • .Net 6

Testing

Unit tests are located here.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-beta.5012 164 8/6/2025
1.0.0-beta.3865 149 4/9/2025
1.0.0-beta.2292 152 9/27/2024
1.0.0-beta.2286 70 9/26/2024
1.0.0-beta.1538 171 7/10/2024
1.0.0-alpha7 280 12/28/2023
1.0.0-alpha251 125 9/10/2023
1.0.0-alpha250 107 9/10/2023
1.0.0-alpha1 251 7/16/2023