.NET Layered LINQ Design

I am new to architecture and am setting up an application for my next .NET project. My proposed architecture design is as follows:

This is a traditional three-tier application that contains: DataLayer (LINQ + partial classes) BusinessLogicLayer (Entities + Validation Logic) (Optional) Service Level (WCF) UI (website and Windows application)

Data Layer: The data layer will contain my DataContext classes (e.g. LINQ) and partial classes. These partial classes will have a basic calculation logic (for example, VAT calculation) and other database level checking logic.

Business layer: This will have properties similar to the data layer, but will also contain validation logic at the user interface level. E.g. if the user tries to enter a user name that is not in the database, he needs to inform the user that the user does not exist. (this is where I am afraid). The object will be Lazy Loaded when the properties are called, not when the object is created.

interface: This will be the traditional level of user interface in which business objects will be called.

The reason I distort the business layer from DataLayer even when using LINQ is because if I want to add more mid-level objects, for example. WCF, then I want it to talk to the business layer, not data. I believe that denouement helps when the application grows. (I think)

, - . - ( ). . Lazy, , , , , ( ). . appriciated.

, PREYASH

+3
1

- KISS/YAGNI. , , , , .

, , , , . , , .

, , . , null, , . -, . -, CRUD , , , .

, , . - ( ) ( ), , , - / -.

, , .

, , -, , , .

+2

Source: https://habr.com/ru/post/1760480/


All Articles