IBeam.Api 2.0.64

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

IBeam.Api

IBeam.Api provides reusable API primitives for consistent ASP.NET Core endpoints:

  • Standardized success/error response envelopes (ApiResponse, ApiPagedResponse)
  • Global exception middleware (UseApiExceptionHandling)
  • API configuration/DI helpers (AddIBeamApi)
  • Reusable base controllers (ApiControllerBase, CrudControllerBase)

Quick Start

Register API services:

builder.Services.AddIBeamApi(builder.Configuration);

Use middleware:

app.UseApiExceptionHandling();

Service Boundary and Errors

Controllers should stay thin. They adapt HTTP requests to service calls and shape responses; they should not own business rules, persistence rules, or duplicate service policy checks.

Services own business rules, validation decisions, logging/auditing decisions, and expected error classification. Expected failures should use typed, user-safe exceptions or service results that controllers can return as friendly messages.

Unexpected exceptions and system-level failures should bubble to ApiExceptionMiddleware. The middleware returns a generic error response unless detailed errors are enabled, and persists operational details through IApiErrorSink when configured. In the Azure Table identity provider, that sink writes to the SystemErrors table.

CrudControllerBase

CrudControllerBase<TService, TEntity, TKey> is an opt-in baseline controller with route defaults and operation flags.

  • Base route: api/[controller]
  • GetById enabled by default
  • Other operations disabled by default (GetAll, GetByIds, Post, Put, Delete)
  • Strongly-typed async service contracts (no dynamic)

Service Contracts

Implement the contracts you need in your service:

  • IGetAllService<TEntity>
  • IGetAllWithArchivedService<TEntity>
  • IGetByIdService<TEntity, TKey>
  • IGetByIdsService<TEntity, TKey>
  • ICreateService<TEntity>
  • IUpdateService<TEntity>
  • IDeleteService<TKey>

Example

using IBeam.Api.Abstractions;
using IBeam.Api.Controllers;
using Microsoft.AspNetCore.Mvc;

public sealed record Patient(Guid Id, string Name);

public interface IPatientService :
    IGetByIdService<Patient, Guid>,
    IGetAllService<Patient>,
    ICreateService<Patient>,
    IUpdateService<Patient>,
    IDeleteService<Guid>;

[ApiController]
[Route("api/[controller]")]
public sealed class PatientsController : CrudControllerBase<IPatientService, Patient, Guid>
{
    public PatientsController(IPatientService service) : base(service) { }

    protected override bool AllowGetAll => true;
    protected override bool AllowPost => true;
    protected override bool AllowPut => true;
    protected override bool AllowDelete => true;
}

Created (201) Behavior

For POST, default response is 200 OK with envelope.
If you want 201 Created, override:

  • ReturnCreatedOnPosttrue
  • BuildCreatedRouteValues(TEntity createdEntity) with route values for GetById

Notes

  • Unexpected exceptions should bubble to ApiExceptionMiddleware for centralized handling.
  • If an enabled action is missing the required service contract, an InvalidOperationException is thrown to fail fast with clear diagnostics.
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 (1)

Showing the top 1 NuGet packages that depend on IBeam.Api:

Package Downloads
IBeam.Identity.Repositories.AzureTable

IBeam modular framework components for .NET APIs and services.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.64 60 6/17/2026
2.0.63 67 6/16/2026
2.0.62 67 6/16/2026
2.0.57 153 6/8/2026
2.0.56 125 6/7/2026
2.0.54 166 5/27/2026
2.0.52 114 5/27/2026
2.0.35 97 5/15/2026
2.0.32 110 3/25/2026
2.0.30 100 3/25/2026
2.0.29 98 3/25/2026
2.0.28 95 3/25/2026
2.0.26 106 3/25/2026
2.0.22 102 3/25/2026