I have a unique situation where I am building a DDD based system that needs to access both Active Directory and a SQL database as persistence. Initially this wasnt a problem because our design was setup where we had a unit of work that looked like this:
public interface IUnitOfWork
{
void BeginTransaction()
void Commit()
}
and o...
Hi, I am building a questionnaire creator. A questionnaire consists of sections, sections consist of pages and pages consist of questions. Questionnaire is the aggregate root.
Sections, pages and questions can have what are called shortcodes which should be unique within a questionnaire (but not unique within the database hence they ar...
If you have an Order that references a customer, does the model include the ID of the customer or a copy of the customer object like a value object (thinking DDD)?
I would like to do ths:
public class Order {
public int ID {get;set;}
public Customer customer {get;set;}
...
}
right now I do this:
public class Order {
...
I am looking for a book or blog entry on the following DDD concepts, something specific to MVC and C# code. Quick summary: partially populated domain models from special repository methods and sending only changed domain model properties as JSON back from the client.
More details:
If you have a Customer object but need a drop down li...
I've noticed Repository is usually implemented in either of the following ways:
Method 1
void Add(object obj);
void Remove(object obj);
object GetBy(int id);
Method 2
void Save(object obj); // Used both for Insert and Update scenarios
void Remove(object obj);
object GetBy(int id);
Method 1 has collection semantics (which is...
Can the domain model and the repositories be in separate dlls?
In a 3 tier architecture I guess I would put the domain model in the business layer
and the repositories in the data access layer.
I get confused as it is my understanding that the domain model uses the repositories while the repositories should return objects from the doma...
VS 2010 / C#
Trying to organize a solution and looking for options for naming the project that will host the interfaces for the repository.
I have:
MyProject.Domain
MyProject.WebUI
MyProject.Repositories
MyProject.Interfaces??
So far "Interfaces" is the best name i've come up with, but I don't like it. Any ideas/suggestions?
...
Which layer should the repository classes go in? Domain or Infrastructure?
...
Given:
You have an architecture with the layers presentation, business and data.
You are applying domain-driven design.
You are using an object-relational mapper that lets you create object-oriented queries (e.g., NHibernate which lets you create HQL queries).
Question:
Into which layer should you put the object-oriented queries?
M...
Hi All
Short Summary : I am using DDD approach to design my domain. This resulted in a very deep object hierarchy in my domain. My ORM tool is hibernate. As we all know that hibernate provide various means of modeling inheritance. Initially i used table per subclass hierarchy to realize this complex domain and very soon i ran into perfo...
I'm trying to get EF4 working with ncommon 1.1 which provides DDD patterns such as UnitOfWork, Specification, Repository.
The NCommon configuration line is throwing the following Exception:
SynchronizationLockException occurred
Object synchronization method was called from an unsynchronized block of code.
The actual code throwing the...
I am building an application under DDD architecture, thus I have implemented rich domain objects that can also be entities. These entities can also have full access to (injected) repositories that can do add & remove operations on other objects/entities. So far, this all works without any problems.
But can side effects for objects/entit...