riteshrao / ncommon

A framework for implementing commonly used design patterns when using Domain Driven Design
www.codeinsanity.com
218 stars 61 forks source link

IRepository<T>.Save #12

Closed skorunka closed 13 years ago

skorunka commented 14 years ago

Im confused with IRepository.Save method. Especially in EF implementation, this method is used to Add/Insert object to repository not to Update/Save changes made on it.

How did you mean it?

riteshrao commented 14 years ago

Correct, it's meant to save transient instances. Updating entities is taken care of automatically via object tracking services for EF.

skorunka commented 14 years ago

So, may be we shoud rename it to "Add", "Save" is really confusing :)

dplaskon commented 14 years ago

Agreed; Add and Remove are better names for the repo methods.

riteshrao commented 13 years ago

Added Add in 1.1 branch and marked Save as obsolete.