Vynflow.UserTables.Client 1.0.8

There is a newer version of this package available.
See the version list below for details.
dotnet add package Vynflow.UserTables.Client --version 1.0.8
                    
NuGet\Install-Package Vynflow.UserTables.Client -Version 1.0.8
                    
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="Vynflow.UserTables.Client" Version="1.0.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Vynflow.UserTables.Client" Version="1.0.8" />
                    
Directory.Packages.props
<PackageReference Include="Vynflow.UserTables.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 Vynflow.UserTables.Client --version 1.0.8
                    
#r "nuget: Vynflow.UserTables.Client, 1.0.8"
                    
#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 Vynflow.UserTables.Client@1.0.8
                    
#: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=Vynflow.UserTables.Client&version=1.0.8
                    
Install as a Cake Addin
#tool nuget:?package=Vynflow.UserTables.Client&version=1.0.8
                    
Install as a Cake Tool

User Tables .NET Client (Strict EF-style)

UserTables.Client provides a strict Entity Framework-like API over the Vynflow User Tables JSON API.

Implemented features

  • UserTablesDbContext + UserTableSet<TEntity> abstraction
  • Tracking states: Added, Modified, Deleted, Unchanged
  • SaveChangesAsync() unit-of-work behavior
  • EF-like query surface:
    • Where(...)
    • WhereEq(...), WhereNeq(...), WhereGt(...), WhereLt(...), WhereIn(...)
    • WhereContains(...), WhereStartsWith(...)
    • OrderBy(...) / OrderByDescending(...)
    • ThenBy(...) / ThenByDescending(...)
    • Skip(...) / Take(...)
    • FirstOrDefaultAsync() / FirstAsync()
    • SingleOrDefaultAsync()
    • AnyAsync() / CountAsync()
    • ToListAsync() / FindAsync()
    • AsNoTracking()
  • Mapping:
    • [UserTable("TABLE_ID")]
    • [UserTableKey]
    • [UserTableColumn("ColumnName")]
    • Fluent OnModelCreating overrides (ToTable, HasKey, Property, HasColumnName, HasConverter)
  • HTTP transport with auth headers (Authorization, X-API-Key, X-Domain-ID)
  • Built-in retry/backoff for transient HTTP failures (408, 429, 5xx, network errors)
  • Shared HTTP connection pooling (enabled by default for internally created clients)
  • Lightweight object pooling for query-string builders in transport hot path
  • Pooled decompression buffers (ArrayPool<byte>) in response decode path
  • Typed API exception: UserTablesApiException
  • Optional startup schema auto-migration behind danger flag

Quick start

var options = new UserTablesContextOptionsBuilder()
    .UseBaseUrl("https://vynflow.cloud")
    .UseApiKey("sa-k-vynflow-KEY")
    .UseBearerToken("sa-p-vynflow-SECRET")
    .UseDomainId("DOMAIN_UUID")
    .AllowAutoMigrationDanger(false)
    .UseRetryPolicy(retryCount: 3, baseDelay: TimeSpan.FromMilliseconds(200))
  .UseConnectionPool(
    maxConnectionsPerServer: 128,
    pooledConnectionLifetime: TimeSpan.FromMinutes(10),
    pooledConnectionIdleTimeout: TimeSpan.FromMinutes(2))
    .Build();

await using var db = new MyContext(options);
var activeRows = await db.Leads
  .WhereEq("Active", true)
  .WhereStartsWith("Email", "sales@")
  .UseAndFilters()
  .Take(25)
  .ToListAsync();

Performance and pooling

By default, if you do not pass a custom HttpClient, the client reuses a shared pooled HttpClient per host + pool settings.

  • UseSharedHttpClientPool(true|false) toggles shared client pooling (default: true)
  • UseConnectionPool(maxConnectionsPerServer, pooledConnectionLifetime, pooledConnectionIdleTimeout) tunes transport pool behavior
  • UseHttpClient(...) overrides internal client creation (use this when integrating with IHttpClientFactory)

Auto migration (danger)

When enabled with:

.AllowAutoMigrationDanger(true)

the context performs schema sync automatically before the first data operation:

  • Adds missing columns that exist in your entity mapping
  • Removes remote columns not present in your entity mapping
  • Recreates columns when value type changed (delete + create)

Safer mode:

.AllowAutoMigrationDanger(true)
.AutoMigrationAddOnly(true)

In add-only mode, destructive operations are skipped:

  • No column deletions
  • No delete+recreate for type changes
  • Only missing columns are added

Notes:

  • This is destructive and should be used only in controlled environments.
  • Auto relation columns from server-side automation are preserved.
  • Latest result is available via db.LastSchemaMigrationReport.
  • SchemaMigrationReport.SkippedColumns shows skipped destructive changes in add-only mode.

Projects

  • src/UserTables.Client - library
  • tests/UserTables.Client.Tests - unit tests
  • samples/UserTables.ConsoleSample - end-to-end usage sample

Build

dotnet build UserTables.slnx
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. 
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.