Mango.Nop.Libraries/Mango.Nop.Data
Loretta 5535011df9 Comprehensive documentation overhaul and expansion
- Added detailed .md docs for Core, Data, and Services projects: DTOs, NopDependencies, repositories, transactions, services, and logging bridge
- Updated all project README.md files with metadata, documentation tables, inheritance diagrams, and clearer dependency/reference explanations
- Root README.md now includes a documentation map and improved project/type tables
- Expanded and clarified `.github/copilot-instructions.md` as the single source of truth for domain rules, patterns, and conventions
- Updated ARCHITECTURE.md, CONVENTIONS.md, and GLOSSARY.md to document DTO strategies, transaction and logging patterns, project boundaries, and AyCode integration
- Added CLAUDE.md for Claude-specific code authoring guidance
- All .csproj files now include new docs as non-compilable content
- Ensured clear separation of concerns and improved AI/tooling discoverability across the codebase
2026-03-30 10:26:35 +02:00
..
Interfaces Add Mango.Nop.Data project to solution 2025-11-04 15:57:09 +01:00
Repositories StockQuantityHistoryExt, StockQuantityHistoryDto; improvements, fixes; 2025-11-13 19:58:39 +01:00
docs Comprehensive documentation overhaul and expansion 2026-03-30 10:26:35 +02:00
Mango.Nop.Data.csproj Comprehensive documentation overhaul and expansion 2026-03-30 10:26:35 +02:00
README.md Comprehensive documentation overhaul and expansion 2026-03-30 10:26:35 +02:00

README.md

Mango.Nop.Data

@project { type = "framework" own-dep-projects = [ "AyCode.Core, AyCode.Core.Server, AyCode.Entities, AyCode.Entities.Server, AyCode.Interfaces, AyCode.Interfaces.Server, AyCode.Utils (in AyCode.Core repo)" ] }

Data access layer with repository base classes and DB context abstractions. net9.0.

Documentation

Document Topic
REPOSITORIES.md MgDbTableBase, MgDtoDbTableBase — CRUD hooks, timestamps, delete rules, event bridging
TRANSACTIONS.md MgDbContextBase — 4 transaction methods, lock strategy, callback contract

Folder Structure

Folder Purpose
Interfaces/ Repository interfaces: IMgDalBase, IMgDbContextBase, IMgDbTableBase
Repositories/ Repository base implementations: MgDalBase, MgDbContextBase, MgDbTableBase, MgDtoDbTableBase

Inheritance Chains

Repository hierarchy

nopCommerce EntityRepository<TEntity> (Nop.Data)
  +-- MgDbTableBase<TEntity>
        +-- MgDtoDbTableBase<TDtoEntity, TMainEntity>

Context hierarchy

MgDbContextBase (abstract, implements IMgDbContextBase)
  +-- [Consumer DbContexts in plugins]

DAL hierarchy

MgDalBase<TDbContext> (implements IMgDalBase<TDbContext>)
  +-- [Consumer DALs in plugins]

Interfaces

Interface Purpose
IMgDbTableBase Marker interface for repository classes
IMgDbContextBase Contract: Logger, DataProvider, Orders, Products, 4 transaction methods
IMgDalBase Name property
IMgDalBase<TDbContext> Context, MutextLock — typed access to DB context

Dependencies

  • Mango.Nop.Core (ProjectReference)
  • Nop.Core, Nop.Data (nopCommerce ProjectReferences)
  • Microsoft.AspNetCore.Mvc.NewtonsoftJson