How sinhdev/three-layer-c-shap-mysql works
Project type and purpose
• This is a Three-Layer/.NET 5 solution (“osm.sln”) that demonstrates a classical three-tier architecture (Presentation → Business Logic → Data Access) with two Presentation Layer implementations (ConsolePL and WebPL) and a MySQL backend.
File structure
• Top-level solution file (osm.sln) ties together five projects:
• Persistence (entity classes)
• DAL (Data Access Layer)
• BL (Business Logic Layer)
• ConsolePL (Console Presentation Layer)
• WebPL (Web Presentation Layer)
• Persistence holds pure POCOs (Customer, Item, Order).
• DAL contains data-access classes (CustomerDAL, ItemDAL, OrderDAL) and reads DbConfig.
• BL implements business operations (CustomerBL, ItemBL, OrderBL) and references DAL.
• ConsolePL and WebPL each reference BL and Persistence, and host UI logic.
• Configuration files (DbConfig.txt in PLs and DAL; appsettings*.json in WebPL) define connection strings to MySQL.
README
• Confirms: “Three Layer with .NET 5 connect to MySQL.”
Elements
• Clear, consistent labels for each project/component (e.g., “BL (BusinessLogic)”).
– Blue rectangles for code projects,
– Green for data/entities,
• Annotations for major classes (e.g., OrderBL, OrderDAL) or config files if space allows.