EntityBlast 1.0.0
dotnet add package EntityBlast --version 1.0.0
NuGet\Install-Package EntityBlast -Version 1.0.0
<PackageReference Include="EntityBlast" Version="1.0.0" />
<PackageVersion Include="EntityBlast" Version="1.0.0" />
<PackageReference Include="EntityBlast" />
paket add EntityBlast --version 1.0.0
#r "nuget: EntityBlast, 1.0.0"
#:package EntityBlast@1.0.0
#addin nuget:?package=EntityBlast&version=1.0.0
#tool nuget:?package=EntityBlast&version=1.0.0
EntityBlast 🗄️
![]()
EntityBlast is a sibling in the Blast family of NuGet packages. It provides a single typed entity-store abstraction (IEntityStore<T>) backed by InMemory, JSON file, EF Core, or Dapper — pick the one you need or mix them. It also ships a runtime EF model: register types at startup via IDynamicTypeRegistry and DynamicDbContext picks them up in OnModelCreating, so you can persist types that didn't exist at compile time (for example, types produced by AssemblyBlast).
EntityBlast and AssemblyBlast are independent. Neither depends on the other. EntityBlast does not depend on UtilBlast.
What it gives you
IEntityStore<T>— a small async contract:Save,Insert(batch),Load,Delete,List, with composite-key overloads.- Four backends —
InMemoryEntityStore<T>,FileEntityStore<T>(JSON files in a directory),DbEntityStore<T>(EF Core),DapperEntityStore<T>(auto-creates a table from the type's properties). [IsKeyField]/[IsDisplayField]/[IsRequired]— opt-in property annotations. When[IsKeyField]is absent, key detection falls back to configurable name matches (default:Id).IDynamicTypeRegistry+DynamicDbContext— registerTypeobjects at startup; the EF context exposes aDbSet<T>for each registered type. Useful when types are emitted at runtime.IDynamicEntityResolver— resolve anIEntityStore<T>for aTypeyou only know at runtime, with an in-memory fallback if no store is registered for that type.
Install
dotnet add package EntityBlast
Quick start — InMemory
public class Person
{
[IsKeyField]
public string Id { get; set; } = "";
public string Name { get; set; } = "";
}
var store = new InMemoryEntityStore<Person>();
await store.SaveAsync("p1", new Person { Id = "p1", Name = "Ada" });
var loaded = await store.LoadAsync("p1");
Quick start — File (JSON)
var keySelector = DynamicKeySelectorFactory.CreateSelector<Person>(["Id"]);
var store = new FileEntityStore<Person>("./data", keySelector);
await store.SaveAsync(new[] { "p1" }, new Person { Id = "p1", Name = "Ada" });
Quick start — Dapper
Func<IDbConnection> open = () =>
{
var c = new SqliteConnection("Data Source=app.db");
c.Open();
return c;
};
var store = new DapperEntityStore<Person>(open, fallbackKeyNames: ["Id"]);
// CREATE TABLE IF NOT EXISTS Person (...) runs on construction
Quick start — EF Core with runtime types
builder.Services.AddEntityBlast(o =>
{
o.RegisterDbStore = true;
o.ConfigureDynamicDb = db => db.UseSqlite("Data Source=app.db");
});
// Anywhere with access to IDynamicTypeRegistry:
registry.RegisterType(typeof(Person)); // or a runtime-emitted Type
License
MIT, see LICENSE.txt.
| Product | Versions 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. |
-
net10.0
- Dapper (>= 2.1.66)
- Microsoft.EntityFrameworkCore (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 98 | 4/28/2026 |