Best practice for applying domain design in .NET?

I am trying to learn and apply a domain-based concept in my software development. The first thing I'm trying to do is create my domain model based on the needs of business logic. I also often use the OR Mapping tool, such as LLBLGen, NHibernate, or Linq to SQL, to create a data model and access data. The domain model and the data model, however, are often very similar, which makes me wonder what benefit I get by supporting the two models.

Can anyone share their practical thoughts on domain design? Also, how would you feel about the data model or data access level when using DDD in your application?

Thanks in advance.

EDIT

Found a good article an article with sample code about the repository template.

+3
source share
3 answers

I drop access to data through the repository template, so I completely save my POCO domain objects and data provider.

This allows me to fashion my application in terms of a domain, focusing on logic, primarily through unit tests.

Once this settles down, I put the Presentation layer (usually web pages) in the layer, and then commit the specific database schema. Then I implement my specific repository classes, which can be L2S.

- http://www.duncangunn.me.uk/dasblog/2009/04/11/TheRepositoryPattern.aspx http://www.duncangunn.me.uk/dasblog/2009/06/27/MockingLinqToSQLRepositories.aspx

, , Unit of Work.

+4
+2

DDD, , .

( grid-, . Gojko Adzic post).

When your project becomes a truly managed domain, your applications are more flexible for new business needs, as the implementation becomes truly a drillthrough of the implementation.

+2
source

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


All Articles