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)
| NuGetGallery source | AI•Pkg table | Changes |
|---|---|---|
Packages | Packages | Remove: RequiresLicenseAcceptance, DevelopmentDependency, IsSymbolsPackage. Add: Capabilities, Targets, Permissions (JSON columns) |
PackageVersions | PackageVersions | Same as above; keep download count |
PackageOwners | PackageOwners | No change |
Users | Users | Keep; remove legacy OpenID fields |
Credentials | Credentials | Keep PBKDF2 API key structure |
PackageDependencies | PackageDependencies | Add Apms column (JSON) instead of TargetFramework |
PackageTags | PackageTags | No change |
PackageHistories | PackageHistories | No change |
PackageRenames | (drop) | Not needed |
SymbolPackages | (drop) | Not applicable |
New JSON Columns
Three new JSON columns onPackages / PackageVersions:
| Column | JSON Type | Example |
|---|---|---|
Capabilities | string[] | ["skill","command"] |
Targets | string[] | ["claude-code","cursor"] |
Permissions | string[] | ["filesystem:read","network:outbound"] |
nvarchar(max) JSON columns and indexed via computed columns where needed for Azure AI Search sync.
Schema Change Workflow
Publish DB project
Publish the
.sqlproj to the target database (generates and runs migration scripts).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.