Repository pattern and mapping between domain models and Entity Framework

My repositories deal with and provide persistence for a rich domain model. I do not want to expose the anemic, Entity Framework data entity to my business layers, so I need some way of mapping between them. If you you use Entity Framework, it can map Rich Domain Model itself. I’ve answered the similar question … Read more

How does a service layer fit into my repository implementation?

Take a look at S#arp Architeture . It’s like a best practices architectural framework for building ASP.NET MVC applications. The general architecture pattern is to have 1 repository per entity which is responsible only for data access and 1 service per repository which is responsible only for business logic and communicating between controllers and services. … Read more

Transactions in the Repository Pattern

Booting my computer this morning I faced the exact problem for a project I am working on. I had some ideas which lead to the following design – and comments would be more than awesome. Unfortunately the design suggested by Josh isn’t possible, as I have to work with a remote SQL server and can’t … Read more

What is the difference between Command + CommandHandler and Service?

Having Commands gives you the benefits of the good old Command pattern: you can parameterize an object, e.g. a UI element, with a Command to perform you can store a Command and execute it later, e.g. in a queue or a transaction log you can track which Commands you executed, giving you a foundation for … Read more

Is DDD a waste of time? [closed]

Many developers who think DDD is useful for their project fall into the trap that they think what their job is all about is writing code. This isn’t the case. A developer’s job is about realizing functionality so a problem can be solved through software. This results in the conclusion that writing code isn’t the … Read more

Doctrine Entities and business logic in a Symfony application

See here: Sf2 : using a service inside an entity Maybe my answer here helps. It just addresses that: How to “decouple” model vs persistance vs controller layers. In your specific question, I would say that there is a “trick” here… what is a “group”? It “alone”? or it when it relates to somebody? Initially … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)