Skip to main content

Vital Core Extraction

Problem Statement

The EITWEP.Model project is the "Anchor of the Monolith". It contains:

  • 840 EntityClasses (LLBLGen-generated)
  • 369 EntityPartials with custom logic
  • 1,985 Business files with mixed concerns

This layer is heavily coupled with System.Web, System.Drawing, and custom legacy interfaces, preventing it from being used in a modern .NET environment (.NET 10+).


Objective

Decouple the Vital Core from EITWEP.Model to enable:

  1. Modern API Development – New .NET 10 services can reference the same entities
  2. Headless Execution – Background jobs and CLI tools without HttpContext
  3. Reduced Coupling – Clear separation between data, abstractions, and domain logic

Target Architecture

ComponentTargetContains
Wep.Core.Abstractions.NET Standard 2.1IWepActivityable, ICommunicable, IEITLogItemable
Wep.Core.Data.NET Standard 2.1EntityClasses, WEPV2DataContext configuration
Wep.Core.Domain.NET Standard 2.1Pure business logic, static helpers
EITWEP.Model.NET 4.8 (Shim)Type Forwarding, Impure Logic

Implementation Phases

PhaseObjectiveTimeline
ACreate Wep.Core.Abstractions with portable interfacesWeek 1
BExtract entities to Wep.Core.Data with Type ForwardingWeek 2-3
CSeparate pure domain logic to Wep.Core.DomainWeek 4+

Documents

DocumentDescriptionStatus
Session 1 AnalysisTechnical deep-dive, risk assessment, architecture proposal🟠 DRAFT
Implementation PlanPhased approach, verification steps, rollback strategy🟠 DRAFT

Key Risks

RiskSeverityMitigation
Breaking 10+ dependent projects🔴 CriticalType Forwarding
SaveChanges() fails without HttpContext🔴 HighIHttpContextAccessor injection
Interface circular dependencies🟡 MediumAbstractions shim layer
LLBLGen regeneration overwrites🟡 MediumNever touch generated files

Open Decisions

[!CAUTION] Decision Required: Should Wep.Core.* libraries be Project References or NuGet Packages?