Skip to content
CAI
Software that uses CAICheck a score

efcore/EFCore.VisualBasic

50.3

Adequate · 20 September 2026

14.7k

lines of production code

VB.NET

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Visual Basic design-time support library for Entity Framework Core, enabling VB developers to utilize core ORM features like reverse engineering, model scaffolding, and database migrations. It provides the necessary infrastructure to generate VB.NET code for DbContexts, entity classes, and migration scripts from database models. The implementation includes specific helpers for VB syntax translation, LINQ expression handling, and provider-specific annotation filtering to ensure compatibility with major EF Core providers.

How it got here

2017–2018 — EF Core Visual Basic design-time support

5 changes.

This period focused on the initial release and expansion of Entity Framework Core design-time support for Visual Basic, including reverse engineering, model generation, and database migration capabilities. The work involved adding VB-specific utility extensions, graph algorithms for operation ordering, and a sandbox project to demonstrate SQLite data access scenarios.

2021–2022 — Visual Basic support implementation

7 changes.

This period focused on implementing comprehensive Visual Basic support for Entity Framework Core, including design-time services, LINQ translation, and runtime annotation generation. The work involved rewriting scaffolding mechanisms using T4 templates and adding extensive test coverage to ensure correct code generation for various providers and data types.

Features

Add EF Core sandbox for SQLite data access

A new sandbox project has been added to demonstrate Entity Framework Core usage with SQLite. It includes a SchoolContext configured to connect to a local School.db file and map Course, Enrollment, and Student entities, along with a console application entry point that inserts a student record and queries the database count.

Sandbox · high confidence

Add Entity Framework Core scaffolding templates for Visual Basic

This change introduces the EntityFrameworkCore.VisualBasic.Templates package, providing T4-based code generation templates that scaffold DbContext and entity classes in Visual Basic. Users can now generate VB.NET data access code from their EF Core models, with support for data annotations, fluent API configurations, and navigation properties.

EFCore.VisualBasic.Templates · high confidence

Add Visual Basic support for EF Core database migrations

Users can now generate database migration code in Visual Basic. This change introduces three new design-time services—\VisualBasicMigrationsGenerator\, \VisualBasicMigrationOperationGenerator\, and \VisualBasicSnapshotGenerator\—which produce \.vb\ files for migration scripts and model snapshots, enabling Visual Basic projects to use the standard EF Core migration workflow.

EFCore.VisualBasic/Migrations · high confidence

Add Visual Basic utility extensions and graph algorithms

The EFCore.VisualBasic package now includes a set of utility modules to support Visual Basic-specific code generation and internal processing. This adds extension methods for type reflection (SharedTypeExtensions, VBTypeExtensions, PropertyInfoExtensions) to handle nullable types, numeric checks, and type name formatting, as well as dictionary and enumerable helpers (DictionaryExtensions, EnumerableExtensions). It also introduces a generic Graph and Multigraph implementation in the Utilities namespace, providing topological sorting and batching capabilities used for ordering database operations.

EFCore.VisualBasic · high confidence

Added VB.NET entity models for the sandbox application

New model classes (Course, Enrollment, Instructor, Student) and a Grade enum have been added to the Sandbox/Models directory. These define the data structure for the application, including relationships such as student enrollments and instructor-course assignments, and utilize EF Core 5.0 features like many-to-many relationship support and explicit date handling.

Sandbox/Models · high confidence

Initial release of EF Core Visual Basic design-time support

This change introduces the initial version of the EntityFrameworkCore.VisualBasic package, enabling Visual Basic developers to use Entity Framework Core design-time features such as reverse engineering models and managing migrations. The repository setup includes the main library project, a test suite, a sandbox, and a dedicated templates package for customizing generated code, along with updated documentation and build configuration.

(repo-wide) · high confidence

Introduce VisualBasicHelper for VB-specific code generation

The design-time infrastructure now includes a new VisualBasicHelper class that handles Visual Basic-specific syntax generation. This helper manages type literal conversions for a wide range of data types (including DateOnly, TimeOnly, and BigInteger), generates valid VB identifiers with proper keyword escaping, and constructs lambda expressions for property access. It also integrates with a LinqToVisualBasicSyntaxTranslator to ensure LINQ expressions are correctly translated into Visual Basic syntax during model generation and migration scaffolding.

EFCore.VisualBasic/Design/Internal · high confidence

Introduce design-time services and compiled model support for Visual Basic

The \EFCore.VisualBasic/Design\ package now registers the full set of design-time services required for Visual Basic, including the new \LinqToVisualBasicSyntaxTranslator\ for translating LINQ expressions to Roslyn syntax, and the \VisualBasicRuntimeAnnotationCodeGenerator\ to support compiled models. These services are wired up via \EFCoreVisualBasicServices\ and automatically enabled for InMemory, Cosmos, SQLite, and SQL Server providers through assembly-level \DesignTimeServicesReference\ attributes in the build targets.

EFCore.VisualBasic/Design · high confidence

Visual Basic runtime annotation code generators for EF Core providers

This change adds Visual Basic-specific runtime annotation code generators for Cosmos DB, In-Memory, SQL Server, and SQLite providers. These generators ensure that design-time scaffolding (such as compiled models) produces correct Visual Basic syntax by filtering out provider-specific annotations that are not needed at runtime (e.g., SQL Server identity settings, Cosmos throughput, SQLite spatial metadata). Each provider has a corresponding design-time service registration to wire up the generator.

EFCore.VisualBasic/Design/RuntimeAnnotationCodeGenerator · high confidence

Behavioural changes

Reimplemented reverse-engineering scaffolding using T4 templates

The scaffolding code generators in EFCore.VisualBasic have been rewritten to use T4 templates (VisualBasicDbContextGenerator and VisualBasicEntityTypeGenerator) instead of the previous approach. This change introduces a new VisualBasicModelGenerator and VisualBasicRuntimeModelCodeGenerator to orchestrate the generation of DbContext, entity types, and compiled models in Visual Basic. Users will see the generated scaffolding code produced via these new templates, which handle context configuration, entity properties, navigations, and data annotations.

EFCore.VisualBasic/Scaffolding · high confidence

Test coverage

Added tests for Visual Basic code generation and scaffolding

Added comprehensive test coverage for the Visual Basic support in Entity Framework Core, including unit tests for the \VisualBasicHelper\ (literal generation for primitives, collections, and dictionaries), the \LinqToVisualBasicTranslator\ (expression tree translation for constants, operators, and null handling), the \VisualBasicMigrationOperationGenerator\ (migration script generation for columns, keys, and constraints), and the \VisualBasicDbContextGenerator\ (scaffolding of DbContext and entity types from a database model).

Test · high confidence

Dependencies

Upgrade to .NET 8/9 and EF Core 9.0 RC 2

The project has been updated to target .NET 8 (runtime) and .NET 9 (tests), aligning with the new major version 9.0.0-alpha of the library itself. All Entity Framework Core dependencies, including SqlServer, Sqlite, Cosmos, Design, and InMemory providers, have been bumped to version 9.0.0-rc.2.24456.1, and the Roslyn compiler reference is updated to 4.8.0. This change ensures compatibility with the latest .NET runtime and EF Core release candidate features.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 52 → 50 (-2.1)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 84 → 84 (+0.1)
  • Architecture 64 → 64 (+0.0)
  • Maturity 38 → 38 (+0.0)
  • Readiness 58 → 50 (-7.9)
  • Security 85 → 83 (-2.0)

Resolved (4)

  • Bounded contexts not declared
  • Build status unknown
  • No exposed public API
  • dormant codebase — no living knowledge left to concentrate

New (150)

  • ClassTooLong: VisualBasicDbContextGenerator (EFCore.VisualBasic/Scaffolding/Internal/VisualBasicDbContextGenerator.Interface.vb)
  • ClassTooLong: VisualBasicRuntimeAnnotationCodeGenerator (EFCore.VisualBasic/Design/VisualBasicRuntimeAnnotationCodeGenerator.vb)
  • ClassTooLong: VisualBasicRuntimeModelCodeGenerator (EFCore.VisualBasic/Scaffolding/Internal/VisualBasicRuntimeModelCodeGenerator.vb)
  • DictionaryExtensions.Remove (cognitive 18) (EFCore.VisualBasic/DictionaryExtensions.vb)
  • Documentation: no architecture or design documentation (README.md)
  • Dormant codebase
  • Duplicated block (10 lines × 3) (EFCore.VisualBasic/Design/RuntimeAnnotationCodeGenerator/RelationalVisualBasicRuntimeAnnotationCodeGenerator.vb)
  • Duplicated block (110–111 lines × 2) (EFCore.VisualBasic/Migrations/Design/VisualBasicMigrationOperationGenerator.vb)
  • Duplicated block (12 lines × 2) (EFCore.VisualBasic/Design/RuntimeAnnotationCodeGenerator/SqlServerVisualBasicRuntimeAnnotationCodeGenerator.vb)
  • Duplicated block (13 lines × 2) (EFCore.VisualBasic/Design/RuntimeAnnotationCodeGenerator/RelationalVisualBasicRuntimeAnnotationCodeGenerator.vb)
  • Duplicated block (13 lines × 2) (EFCore.VisualBasic/Migrations/Design/VisualBasicMigrationOperationGenerator.vb)
  • Duplicated block (13 lines × 5) (EFCore.VisualBasic/Design/RuntimeAnnotationCodeGenerator/RelationalVisualBasicRuntimeAnnotationCodeGenerator.vb)
  • Duplicated block (14 lines × 2) (EFCore.VisualBasic/Migrations/Design/VisualBasicSnapshotGenerator.vb)
  • Duplicated block (14 lines × 5) (EFCore.VisualBasic/Migrations/Design/VisualBasicMigrationOperationGenerator.vb)
  • Duplicated block (15 lines × 8) (EFCore.VisualBasic/Migrations/Design/VisualBasicMigrationOperationGenerator.vb)
  • Duplicated block (16 lines × 14) (EFCore.VisualBasic/Migrations/Design/VisualBasicMigrationOperationGenerator.vb)
  • Duplicated block (16 lines × 3) (EFCore.VisualBasic/Migrations/Design/VisualBasicMigrationOperationGenerator.vb)
  • Duplicated block (17 lines × 2) (EFCore.VisualBasic/Design/RuntimeAnnotationCodeGenerator/RelationalVisualBasicRuntimeAnnotationCodeGenerator.vb)
  • Duplicated block (17 lines × 2) (EFCore.VisualBasic/Migrations/Design/VisualBasicMigrationOperationGenerator.vb)
  • Duplicated block (17 lines × 5) (EFCore.VisualBasic/Migrations/Design/VisualBasicMigrationOperationGenerator.vb)
  • …and 130 more

Architecture

  • Unchanged — 2 containers · 0 contexts · 0 edges

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

efcore/EFCore.VisualBasic was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 4fc0bfc976aa59d863ed1f14426a16b7b19bd553 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.