Oproto.FluentDynamoDb
1.0.0
dotnet add package Oproto.FluentDynamoDb --version 1.0.0
NuGet\Install-Package Oproto.FluentDynamoDb -Version 1.0.0
<PackageReference Include="Oproto.FluentDynamoDb" Version="1.0.0" />
<PackageVersion Include="Oproto.FluentDynamoDb" Version="1.0.0" />
<PackageReference Include="Oproto.FluentDynamoDb" />
paket add Oproto.FluentDynamoDb --version 1.0.0
#r "nuget: Oproto.FluentDynamoDb, 1.0.0"
#:package Oproto.FluentDynamoDb@1.0.0
#addin nuget:?package=Oproto.FluentDynamoDb&version=1.0.0
#tool nuget:?package=Oproto.FluentDynamoDb&version=1.0.0
Oproto.FluentDynamoDb
A modern, fluent-style API wrapper for Amazon DynamoDB with source generation, expression formatting, and full AOT compatibility.
Installation
dotnet add package Oproto.FluentDynamoDb
dotnet add package Oproto.FluentDynamoDb.SourceGenerator
Overview
Oproto.FluentDynamoDb provides a type-safe, intuitive interface for DynamoDB operations. The library eliminates boilerplate through source generation while providing an expression-based syntax for all DynamoDB operations.
Key benefits:
- Source Generation: Automatic generation of field constants, key builders, and mapping code at compile time
- Expression Formatting: String.Format-style syntax eliminates manual parameter naming
- LINQ Support: Type-safe queries using C# lambda expressions
- AOT Compatible: Full support for Native AOT compilation
- Transaction Support: Fluent interface for DynamoDB transactions
Usage
Define an Entity
using Oproto.FluentDynamoDb.Attributes;
[DynamoDbTable("users")]
public partial class User
{
[PartitionKey]
[DynamoDbAttribute("pk")]
public string UserId { get; set; } = string.Empty;
[DynamoDbAttribute("username")]
public string Username { get; set; } = string.Empty;
[DynamoDbAttribute("email")]
public string Email { get; set; } = string.Empty;
}
Basic Operations
using Amazon.DynamoDBv2;
using Oproto.FluentDynamoDb.Storage;
var client = new AmazonDynamoDBClient();
var table = new UsersTable(client, "users");
// Create
var user = new User { UserId = "user123", Username = "john_doe", Email = "john@example.com" };
await table.Users.PutAsync(user);
// Read
var retrievedUser = await table.Users.GetAsync("user123");
// Query with expression formatting
var activeUsers = await table.Query
.Where("{0} = {1}", User.Fields.UserId, User.Keys.Pk("user123"))
.ToListAsync<User>();
// Update
await table.Users.Update("user123")
.Set(x => new UserUpdateModel { Status = "active" })
.UpdateAsync();
// Delete
await table.Users.DeleteAsync("user123");
Features
- 🔧 Source Generation - Zero boilerplate with compile-time code generation
- 📝 Expression Formatting - Concise queries with format string syntax
- 🎯 LINQ Expressions - Type-safe lambda expression support
- 🔗 Composite Entities - Multi-item entities and related data patterns
- ⚡ Batch Operations - Efficient batch get/write operations
- 🌊 Stream Processing - Fluent pattern matching for DynamoDB Streams
- 🔒 Field-Level Security - Logging redaction and optional KMS encryption
Links
- 📚 Documentation: fluentdynamodb.dev
- 🐙 GitHub: github.com/oproto/fluent-dynamodb
- 📦 NuGet: Oproto.FluentDynamoDb
License
MIT License - see LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. |
-
net8.0
- AWSSDK.DynamoDBv2 (>= 4.0.0 && < 5.0.0)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Oproto.FluentDynamoDb:
| Package | Downloads |
|---|---|
|
Oproto.FluentDynamoDb.SystemTextJson
System.Text.Json serialization support for Oproto.FluentDynamoDb. Provides AOT-compatible JSON serialization for complex objects stored in DynamoDB. |
|
|
Oproto.FluentDynamoDb.BlobStorage.S3
S3 blob storage provider for Oproto.FluentDynamoDb. Enables storing large data externally in Amazon S3 with only a reference in DynamoDB. |
|
|
Oproto.FluentDynamoDb.FluentResults
FluentResults extensions for Oproto.FluentDynamoDb providing Result<T> return patterns instead of exceptions. |
|
|
Oproto.FluentDynamoDb.Streams
DynamoDB Streams processing support for Oproto.FluentDynamoDb. Provides fluent API for processing stream events with type-safe entity deserialization, LINQ-style filtering, and discriminator-based routing for Lambda functions. |
|
|
Oproto.FluentDynamoDb.Geospatial
Geospatial query support for Oproto.FluentDynamoDb using GeoHash encoding. Enables efficient location-based queries in DynamoDB with type-safe geospatial operations. Supports proximity queries, bounding box queries, and distance calculations with AOT compatibility. |
GitHub repositories
This package is not used by any popular GitHub repositories.