D
D
Dmitry2016-11-24 01:46:32
ASP.NET
Dmitry, 2016-11-24 01:46:32

Domain layer in N-layer architecture?

Hello! Colleagues tell me and tell about the domain model? The question is, for example, I have an entity User - poco class, generated from the User table in the database, and for example it has such fields

class UserEntity
{
public Guid Id{get;set;}
public string Name{get;set;}
public string Password{get;set;}
}

Reading about layered architecture, they talk about Domain Layer and that this Domain Layer should have its own Domain Model - as I understand it, this is a domain model, and the question is whether the UserDomainModel class should have the same fields as UserEntity, if not, according to why, because, for example, on one page in the Presentation Layer I need to know the User - Id and Name, and on the other page I need to know, for example, Id, Name, Password ? Tell me, explain how to be? Is it possible to stretch UserEntity through the entire application so that each layer can use this class?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Kovalsky, 2016-11-24
@dmitryKovalskiy

Well, in my opinion it is not very clear why to drag the password through the system. It is either hashed and its value is useless to you or not hashed and then it can be compromised.

S
Sergey delphinpro, 2017-03-08
@YoManYo

https://jsfiddle.net/zL4y4myb/
https://jsfiddle.net/zL4y4myb/1/ round

V
Vitaly, 2017-03-08
@rim89

1. picture
2. if you need rubber and css - dots like border: dotted , arrow like CSS shape

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question