I thought that the domain-driven design says that the Get methods are in the repositories, and the Add / Del / Update is in the business objects?
Can you please clarify this?
When I look at the MVCMusicStore sample, all CRUD methods in the database are in entities ?!
http://mvcmusicstore.codeplex.com/SourceControl/changeset/view/d9f25c5263ed#MvcMusicStore%2fModels%2fShoppingCart.cs
? ( Does "" -?) - , DDD Active Record vs. Repository.
, . DDD , . DDD . , .
, DDD , Active Record Repository .
, , , , MVC. , , - .
, -. , ( a.k.a.) .
Here a typical repository looks like this:
public class OrderRepository { public MyClass Load(Guid id); // throws an exception if not found public void Save(Order order); public void Delete(Guid id); // does not throw an exception if not found (idempotent) }