Re: IDDD - Repository add vs save

Alistair Bush <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <CABn-dZbeoyXF=33Xm6FR_g2UizDO7+QHQAFdbEZYeMarwa6QWw@mail.gmail.com>
As they are implemented as a Unit of Work.  Which basically allows you to
make a number of changes and then save them all in a single operation.

There is nothing stopping you from having a repository interface without
the save method and just 'in the background' call save.

Something like this.  (sadly it doesn't demonstrate the actual repository
so isn't that good an example).
http://blog.gauffin.org/2012/02/repositories-unit-of-work-and-asp-net-mvc/#.UkTkE4YQ4t4



On Fri, Sep 27, 2013 at 10:11 AM, Caleb Cushing <[email protected]>wrote:

> **
>
>
> I was just reading this chapter to clarify my understanding, why is it
> that repositories that do 'put' like behavior have to use save? why
> couldn't they just do add and have both first add and subsequent
> updates do put under the hood?
>
> --
> Caleb Cushing
>
> http://xenoterracide.com
>
> Calendar:
>
> https://www.google.com/calendar/embed?src=xenoterracide%40gmail.com&ctz=America/Chicago
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.