EntityFrameworkZip 1.0.1
Sorry nothing really changed except for the descriptions
See the version list below for details.
dotnet add package EntityFrameworkZip --version 1.0.1
NuGet\Install-Package EntityFrameworkZip -Version 1.0.1
<PackageReference Include="EntityFrameworkZip" Version="1.0.1" />
<PackageVersion Include="EntityFrameworkZip" Version="1.0.1" />
<PackageReference Include="EntityFrameworkZip" />
paket add EntityFrameworkZip --version 1.0.1
#r "nuget: EntityFrameworkZip, 1.0.1"
#:package EntityFrameworkZip@1.0.1
#addin nuget:?package=EntityFrameworkZip&version=1.0.1
#tool nuget:?package=EntityFrameworkZip&version=1.0.1
EntityFrameworkZip
A lightweight, in-memory, EF-style database that can be saved to and loaded from a .zip
file.
EntityFrameworkZip is designed for scenarios where you want the feel of Entity Framework but without needing a real database. It runs entirely in memory and lets you persist your data by zipping everything into a single file. Great for testing, demos, prototyping, offline apps, or even small-scale real-world scenarios like save games or config snapshots.
✨ Features
- Familiar
DbContext
-like API - Use
DbSet<T>
and LINQ to query your entities - Save and load the entire database from a
.zip
file - No external dependencies
- Fast and portable
- Easy to integrate into any .NET project
📦 Installation
Install via NuGet:
dotnet add package EntityFrameworkZip
🚀 Getting Started
public class Person : IEntity
{
public int Id { get; set; }
public string Name { get; set; }
}
public class MyDbContext : ZipDbContext
{
public MyDbContext() : base("mydata.zip") { }
public virtual DbSet<Person> People { get; set; }
}
var db = new MyDbContext();
// Add entities
db.People.Add(new Person { Name = "Alice" });
db.People.Add(new Person { Name = "Bob" });
// Query
var all = db.People.Where(p => p.Name.StartsWith("A")).ToList();
// Save to zip
db.SaveChanges();
🧠 When to Use
✅ Unit testing without mocking databases
✅ Desktop apps with lightweight persistence needs
✅ Quick prototypes and demos
✅ Tools that bundle config/data/state in a single zip file
✅ Save game systems or file-based data snapshots
❗ Notes
This is an in-memory database — data is only saved if you explicitly call SaveChanges()
All entities must implement the IEntity interface (with at least an Id property)
Foreign key relationships can be automatically managed
📄 License
MIT — free to use and modify.
💬 Feedback or Contributions?
Found a bug? Want to suggest a feature? Feel free to open an issue or contribute via pull request!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net9.0
- Microsoft.CodeAnalysis.CSharp (>= 4.13.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.