Weequery.EntityFrameworkCore 3.2.0

dotnet add package Weequery.EntityFrameworkCore --version 3.2.0
                    
NuGet\Install-Package Weequery.EntityFrameworkCore -Version 3.2.0
                    
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="Weequery.EntityFrameworkCore" Version="3.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Weequery.EntityFrameworkCore" Version="3.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Weequery.EntityFrameworkCore" />
                    
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 Weequery.EntityFrameworkCore --version 3.2.0
                    
#r "nuget: Weequery.EntityFrameworkCore, 3.2.0"
                    
#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 Weequery.EntityFrameworkCore@3.2.0
                    
#: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=Weequery.EntityFrameworkCore&version=3.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Weequery.EntityFrameworkCore&version=3.2.0
                    
Install as a Cake Tool

Weequery.EntityFrameworkCore

Checks a Weequery binding list against an EF Core model before any query is built. A property path that nothing maps becomes a startup failure rather than a translation error on the first request that names it.

Installation

dotnet add package Weequery.EntityFrameworkCore

Example

// At startup, once, where a failure is the developer's rather than a caller's
var problems = context.ValidateBindings<Minion>(MinionBindings);

if (!problems.IsValid) { throw new InvalidOperationException(problems.ToString()); }
'Widget' (Gizmo) is not mapped: Minion has no mapped property or navigation called 'Gizmo'

Purpose

Weequery has no knowledge of what the database holds and no dependencies. A binding to Lair.Capasity is well-formed as far as Weequery is concerned: the key is legal, the path parses, and Validate() reports that the request fits the bindings. Weequery cannot detect that no column has that name.

Without this check the failure is deferred to the first caller who names that key, and arrives as an EF translation error in a request handler, where it looks like a bug rather than a typo in the binding list.

Check Answers When
Inquiry.Validate() does this request fit the bindings per request
context.ValidateBindings<T>(...) do the bindings fit the model at startup, once
inquiry.Build().ToQueryString() will this query translate per query

What it checks

Each BindingRequest.PropertyPath is walked segment by segment against the model:

  • A mapped column ends a path and cannot continue one.
  • A reference navigation continues a path, and is legal on its own (only the null tests work on it).
  • A collection navigation cannot be reached through; the problem says to use a quantifier instead.
  • Anything else is reported, naming the type being searched, so a misspelling three levels down identifies the level at which it failed.

Rules:

  • At most one problem is reported per binding, because a path means nothing after the first segment that fails to resolve.
  • Every binding is checked, so one call returns all the bad bindings.
  • If T itself is not in the model, that is reported as one problem rather than one per binding.

What it does not check

Mapped is not translatable, and this package checks only the first. Whether a query translates depends on the operator and the provider as much as on the property. The standard example is IsMatch against SQL Server, which has no regular expressions. A binding that passes here can still meet a provider that cannot translate what is asked of it.

Where the backend lacks an operator rather than a property, no model is needed: list the operator on InquirySettings.Operators, and a condition using it is refused by Validate() and by Build(), as an unbound field is. See the core README. This package covers the other half: whether the property a binding names is mapped at all.

The complete check for one query is to build it and call ToQueryString(), which compiles it through the provider without opening a connection, and throws where it cannot:

try { inquiry.Build().ToQueryString(); }
catch (InvalidOperationException) { /* the provider refused it */ }

ToQueryString() is per query; ValidateBindings is per binding. They answer different halves of the same question, and most applications want both.

No connection is opened

The model is built from the application's own configuration rather than read from the server, so the check costs whatever building the model costs and nothing more. Run it at startup beside the check that the connection string works, not on the request path.

Versions

Each target framework takes its own EF Core version rather than one floor for both: 10.0.15 for net10.0 and 11.0.0 for net11.0.

The reference is to Microsoft.EntityFrameworkCore, the abstraction, not to any provider. The package reads a model and never touches a database, so the provider underneath is irrelevant.

Licence

MIT, as Weequery.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
3.2.0 77 11/20/2026
3.1.0 125 9/24/2026
3.0.0 103 9/22/2026

Targets .NET 10 and .NET 11, referencing EF Core 10.0.15 and 11.0.0; .NET 8 is no longer supported. Requires Weequery 3.2.0.