Skip to content

Latest commit

 

History

History
252 lines (181 loc) · 11.3 KB

File metadata and controls

252 lines (181 loc) · 11.3 KB

Oproto.FluentDynamoDb Documentation

Welcome to the documentation hub for Oproto.FluentDynamoDb - a fluent-style API wrapper for Amazon DynamoDB with automatic code generation capabilities.

New: The source generator now supports both single-entity and multi-entity table patterns, enabling true single-table design with entity-specific accessors. See Single-Entity Tables and Multi-Entity Tables for details.

📖 Documentation Structure

This documentation is organized into four main sections to help you find what you need quickly:

🚀 Getting Started

New to the library? Start here to get up and running quickly.

🔧 Core Features

Learn the essential features you'll use every day.

🎯 Advanced Topics

Explore advanced patterns and optimizations.

📚 Reference

Detailed reference documentation for attributes, format specifiers, and troubleshooting.

💡 Examples

Practical code examples for common scenarios.

🏗️ Example Applications

Complete, runnable applications demonstrating real-world patterns.

  • TodoList - Basic CRUD operations with [Scannable] tables and lambda expression updates
  • TransactionDemo - DynamoDB transactions with single-table design and SDK comparison
  • InvoiceManager - Single-table design with hierarchical composite keys and ToCompositeEntityAsync
  • StoreLocator - Geospatial queries comparing GeoHash, S2, and H3 spatial indexing

📑 Additional Resources

🎯 Quick Navigation

I want to...

Get started quicklyQuick Start Guide

Define my first entityFirst Entity Guide

Perform CRUD operationsBasic Operations

Query data efficientlyQuerying Data

Use expression formattingExpression Formatting

Write type-safe update operationsExpression-Based Updates

Optimize queries with projectionsProjection Models

Use single-table designMulti-Entity Tables

Configure optional features (logging, geospatial, encryption)Configuration Guide

Configure logging and diagnosticsLogging Configuration

Use advanced types (Maps, Sets, Lists, TTL)Advanced Type System

See practical examplesAdvanced Types Examples

See a complete CRUD applicationTodoList Example

Learn DynamoDB transactionsTransactionDemo Example

Implement single-table designInvoiceManager Example

Build location-based queriesStoreLocator Example

Migrate existing entitiesAdvanced Types Migration

Work with complex entitiesComposite Entities

Configure discriminators for single-table designDiscriminators

Protect sensitive dataField-Level Security

Use location-based queriesGeospatial Support

Implement multi-tenancySTS Integration

Optimize performancePerformance Optimization

Troubleshoot an issueTroubleshooting Guide

Understand internal architectureInternal Architecture

Find API methods quicklyAPI Reference

Find a specific topicDocumentation Index

🚀 Key Features

Automatic Code Generation

The source generator eliminates boilerplate by automatically creating:

  • Entity mapping methods (C# ↔ DynamoDB)
  • Field name constants for type safety
  • Key builder methods for partition and sort keys
  • Strongly-typed query results

Expression Formatting

Write concise, readable expressions using string.Format-style syntax:

.Where($"{UserFields.Status} = {0} AND {UserFields.CreatedAt} > {1:o}", "active", DateTime.UtcNow.AddDays(-30))

Advanced Entity Patterns

  • Single entities - Traditional one-to-one mapping
  • Multi-item entities - Entities spanning multiple DynamoDB items
  • Related entities - Automatic population based on sort key patterns
  • Composite keys - Computed and extracted key components

Performance & Compatibility

  • Zero runtime reflection - all code generated at compile time
  • AOT compatible - works with Native AOT and trimming
  • Optimized for DynamoDB best practices

🔧 Installation

dotnet add package Oproto.FluentDynamoDb

The source generator is automatically included and runs during compilation.

📚 Learning Paths

For New Users

  1. Quick Start - Get up and running in 5 minutes
  2. Entity Definition - Learn how to define entities
  3. Basic Operations - Master CRUD operations
  4. Querying Data - Learn to query efficiently

For Experienced Users

  1. Composite Entities - Work with complex data patterns
  2. Global Secondary Indexes - Optimize access patterns
  3. Performance Optimization - Tune for production
  4. STS Integration - Implement secure multi-tenancy

For Troubleshooting

  1. Troubleshooting Guide - Common issues and solutions
  2. Error Handling - Exception handling patterns
  3. Attribute Reference - Verify attribute usage

About

Oproto.FluentDynamoDb is developed and maintained by Oproto Inc, a company building modern SaaS solutions for small business finance and accounting.

Links

Maintainer

🤝 Contributing

We welcome contributions! Please:

  • Report issues and bugs on GitHub
  • Suggest new features
  • Submit pull requests
  • Improve documentation

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Getting Help

  • Documentation Issues: Check the Troubleshooting Guide
  • Feature Requests: Open an issue on GitHub
  • Bug Reports: Include a minimal reproduction case
  • Questions: Use GitHub Discussions for community support

Documentation for Oproto.FluentDynamoDb v0.3.0 and later. The library uses source generation with expression formatting as the recommended approach.