Skip to content
github-actions[bot] edited this page Dec 4, 2026 · 8 revisions

Blueprint User Manual

Blueprint logo

Blueprint is a backend application framework for .NET, designed to provide a stable, consistent API across different underlying technologies. Applications interact with Blueprint’s contracts and services, allowing infrastructure choices to evolve independently of business logic.

This manual describes the consumer API available in this repository. Examples target .NET 10 and C# 14. Start with Getting Started to add Blueprint to your project, then follow EShop - Checkout Tutorial for a complete application example.


Getting Started

  • Getting Started: install Blueprint from NuGet or use the DLL and PDB from the latest GitHub release.

Blueprint Entities

  • BlueprintEntity describes the entity contract, inherited properties, and shared Entity API.
  • Data Annotations: configure fields, indexes, generated values, and concurrency tokens.
    • Relationships: define foreign keys, reference properties, inverse collections, and automatic loading.
    • Multilingual Entities: configure languages and read or update translations.
  • Entity Triggers shows how to declare and install prepared triggers.

Blueprint Database

  • BlueprintDatabase: understand the abstract base class, shared configuration, entity registration, and application lifetime.
  • Entity Mapping
  • Reading and Writing Data
    • Query Executors: the shared LINQ API and per-entity DB/RAM execution, including mixed AutoInclude graphs.
    • Transactions: group writes, prepare operations, validate before commit, and handle rollback or cancellation.
  • Lock Factory coordinates work across servers that share a SQL Server database.
  • Caching
    • RAM Caching: cache selected tables and synchronize committed SQL changes.
  • Tutorials
    • EShop - Checkout Tutorial: create a website user, add an iPhone to the basket, and complete checkout with a transaction that saves the order, reduces stock, and clears the basket.

Blueprint File System

  • BlueprintFileSystem defines the shared file and directory operations and resolves public URLs.
    • LocalFileSystem stores files on disk under a configured directory.
    • FtpFileSystem stores files on an FTP server and uses one session per batch.

Blueprint File Storage

  • FileStorage defines how to save file bytes with a size limit and optional extension restrictions.
    • LocalFileStorage saves files on disk under names derived from their SHA-256 hash and timestamp, and returns their public URLs.

Blueprint Background Tasks

  • Background Tasks: register work, use interval or daily schedules, and control execution.

Blueprint Email

  • Messages
  • Senders
    • BlueprintEmailSender defines the shared methods for synchronous and asynchronous email submission.
    • SMTPEmailSender covers SMTP connection settings, authentication, and sending an invoice by email.

Blueprint Log

Help

  • Troubleshooting: identify common configuration, mapping, query, and transaction problems.
  • Contributing: coding style, naming rules, documentation comments, and contribution guidelines.

Reading the examples

Use using Blueprint.Entities; for the static Entity API. Most examples use the Product contract from the EShop checkout tutorial and assume its registration and an active BlueprintDatabase. A page that requires another contract shows that contract explicitly.

Code blocks are independent examples unless stated otherwise. Replace sample connection strings and IDs with values for your application. All database writes should be explicit: editing a loaded object's properties does not save it automatically.

Repository overview

Clone this wiki locally