Afrowave.AJIS.EntityFramework
1.1.0
dotnet add package Afrowave.AJIS.EntityFramework --version 1.1.0
NuGet\Install-Package Afrowave.AJIS.EntityFramework -Version 1.1.0
<PackageReference Include="Afrowave.AJIS.EntityFramework" Version="1.1.0" />
<PackageVersion Include="Afrowave.AJIS.EntityFramework" Version="1.1.0" />
<PackageReference Include="Afrowave.AJIS.EntityFramework" />
paket add Afrowave.AJIS.EntityFramework --version 1.1.0
#r "nuget: Afrowave.AJIS.EntityFramework, 1.1.0"
#:package Afrowave.AJIS.EntityFramework@1.1.0
#addin nuget:?package=Afrowave.AJIS.EntityFramework&version=1.1.0
#tool nuget:?package=Afrowave.AJIS.EntityFramework&version=1.1.0
Afrowave.AJIS.EntityFramework
Entity Framework Core integration for the AJIS (.NET) framework. Provides value converters for storing complex types as AJIS in database columns.
Overview
The EntityFramework library enables storing AJIS-serialized objects in Entity Framework Core databases:
- Value converters - EF Core
ValueConverterfor AJIS serialization - Configuration API - Simple configuration with
UseAjisSerialization() - LINQ support - Query support for AJIS properties
- Complex type mapping - Nested objects, collections, and dictionaries
- Database agnostic - Works with all EF Core providers (SQL Server, PostgreSQL, SQLite, etc.)
Features
- Value converter -
AjisValueConverter<T>for automatic serialization - Collection converter -
AjisCollectionConverter<T>for collections - ** DbContext base** -
AjisDbContextwith automatic configuration - Repository pattern -
AjisFileRepository<T>for file-based storage - LINQ translation - Query support for AJIS properties
- Migration support - Works with EF Core migrations
- Type mapping - Full support for AJIS type mapping features
Installation
dotnet add package Afrowave.AJIS.EntityFramework
Dependencies
| Package | Version | Description |
|---|---|---|
| Afrowave.AJIS.Core | >= 1.0.0 | Core contracts and settings |
| Afrowave.AJIS.Serialization | >= 1.0.0 | Serializer and value types |
| Microsoft.EntityFrameworkCore | >= 10.0.0 | EF Core core package |
| Microsoft.EntityFrameworkCore.Relational | >= 10.0.0 | Relational database support |
Library Summary
| Feature | Description |
|---|---|
| Target Framework | .NET 10.0 |
| Serialization Format | AJIS (custom format) |
| Key Components | AjisValueConverter<T>, AjisCollectionConverter<T> |
| LINQ Support | Full query translation |
| Database Support | All EF Core providers |
| Nullable Reference Types | Enabled |
API
See the API Reference for complete documentation.
Key Types
| Type | Description |
|---|---|
AjisValueConverter<T> |
EF Core value converter for AJIS |
AjisCollectionConverter<T> |
Converter for collections |
AjisDbContext |
Base DbContext with AJIS support |
AjisFileRepository<T> |
File-based repository |
AjisModelBuilderExtensions |
Model configuration extensions |
Usage
Basic configuration
public class UserProfile
{
public int Id { get; set; }
public string Username { get; set; }
// Complex object stored as AJIS
public UserPreferences Preferences { get; set; }
}
public class AppDbContext : AjisDbContext
{
public DbSet<UserProfile> UserProfiles { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
// Configure AJIS serialization
modelBuilder.Entity<UserProfile>()
.Property(e => e.Preferences)
.UseAjisSerialization();
}
}
Repository usage
public class UserRepository : AjisFileRepository<User>
{
public UserRepository() : base("users.ajis") { }
}
// Usage
var repo = new UserRepository();
await repo.InsertAsync(new User { Name = "Alice" });
var user = await repo.GetByIdAsync(1);
LINQ queries
var users = context.Users
.Where(u => u.Preferences.DarkMode)
.OrderBy(u => u.Username)
.ToList();
Documentation
- API Reference - Complete API documentation
- EF Core Integration - EF Core design details
- Getting Started - Quick start guide
Compatibility
- .NET 10.0+
- Entity Framework Core 10.0+
- Nullable reference types enabled
License
MIT
| 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
- Afrowave.AJIS.Core (>= 1.1.0)
- Afrowave.AJIS.Serialization (>= 1.1.0)
- Microsoft.EntityFrameworkCore (>= 10.0.3)
- Microsoft.EntityFrameworkCore.Relational (>= 10.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.
## v1.1.0 (2026-02-16)
### New Features
- EF Core value converters now work with new Ajis static API
- Integration with new Ajis static API from Afrowave.AJIS.Core v1.1.0
### Dependencies
- Afrowave.AJIS.Core v1.1.0
### Notes
- No breaking changes in this release