Reusable domain features for the Avolutions Business Application Framework (BAF).
Install via NuGet:
dotnet add package Avolutions.Baf.Domain
In your Program.cs, add BAF Domain to the service collection and middleware pipeline.
using Avolutions.Baf.Core.Modules.Extensions;
using Avolutions.Baf.Domain.Extensions;
using Microsoft.EntityFrameworkCore;
var builder = WebApplication.CreateBuilder(args);
// Register EF Core DbContext
builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
// Register BAF Core and Blazor
builder.Services.AddBafCore<ApplicationDbContext>()
.AddBafDomain();
var app = builder.Build();
// Initialize BAF Core and Domain
app.UseBafCore()
.UseBafDomain();
app.Run();