EasyAF Overview
EasyAF provides:SQL Server DB Project
The
.sqlproj is the authoritative schema. No hand-written EF migrations.Entity Generation
EasyAF CLI reads the
.sqlproj and generates EF Core 10 entity classes.Repository Generation
Standard CRUD repository classes are generated, reducing boilerplate.
OData Restier
Used exclusively for the internal admin/management API surface. Not exposed publicly.
Data Layer Projects
Schema Definitions
AI•Pkg Table Schema (from NuGetGallery)
New JSON Columns
Three new JSON columns onPackages / PackageVersions:
These are stored as
nvarchar(max) JSON columns and indexed via computed columns where needed for Azure AI Search sync.
Schema Change Workflow
1
Edit SQL files
Edit
.sql files in AI•Pkg.Server.Db/.2
Regenerate entities
Run EasyAF codegen to regenerate entities in
AI•Pkg.Server.Data/.3
Publish DB project
Publish the
.sqlproj to the target database (generates and runs migration scripts).4
Commit changes
Commit both
.sqlproj changes and regenerated entity files.EasyAF Code Generation
Run EasyAF CLI againstAI•Pkg.Server.Db/ to generate:
AI•Pkg.Server.Data/Entities/*.cs— one file per table, strongly typedAI•Pkg.Server.Data/Repositories/*.cs— standard CRUD repositoriesAI•Pkg.Server.Data/AIpkgDbContext.cs— EF CoreDbContextwith allDbSet<T>properties
.gitignore does not exclude them — they are the contract between the DB schema and the application code.
Admin API (OData Restier)
EasyAF’s OData Restier integration is used exclusively for the internal admin/management API surface. It is:- Not on the public surface (no public routes)
- Not in scope for the public Registry API spec
- Accessible only to admin-role authenticated users via internal tooling
AIpkgDbContext, providing a fully explorable admin API without hand-written controllers.