EntityFrameworkZip 1.0.1

Additional Details

Sorry nothing really changed except for the descriptions

There is a newer version of this package available.
See the version list below for details.
dotnet add package EntityFrameworkZip --version 1.0.1
                    
NuGet\Install-Package EntityFrameworkZip -Version 1.0.1
                    
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="EntityFrameworkZip" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EntityFrameworkZip" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="EntityFrameworkZip" />
                    
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 EntityFrameworkZip --version 1.0.1
                    
#r "nuget: EntityFrameworkZip, 1.0.1"
                    
#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 EntityFrameworkZip@1.0.1
                    
#: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=EntityFrameworkZip&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=EntityFrameworkZip&version=1.0.1
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.