tags:

views:

250

answers:

9

I have an interface that defines the ability to persist an entity to a data store. I'm having trouble thinking of a name for it. Any ideas?

public interface IInterfaceForDefiningADataPersistenceOperation<T>
{
    void Store(T entity);
}
+15  A: 

IRepository ?

Mitch Wheat
Indeed - and check out the Repository pattern while you're at it. Good stuff.
Mike Robinson
+8  A: 

How about IFooRepository, where Foo is some base-entity or describes the product. If it truly is generic, then perhaps just IRepository<T>

Marc Gravell
+2  A: 
public interface IPersistenceStrategy<T>

I'm taking a leap and saying you're using the strategy pattern in order to persist things in different ways depending on the strategy you provide.

Garry Shutler
+1  A: 

Did you not like any of these?

  • IPersistenceOperation
  • IDataStoreOperation
  • IEntityStoreOperation
Cory Larson
A: 

Wouldn't an interface be defining a group of operations, rather than 'an operation'?

Will Dean
A: 

IGateway

Then implementations are (for example): UserGateway, ArticleGateway and so on

Roman
+1  A: 

IPersistEntities

Then you can derive class MyNewPersistenceThing : IPersistEntities

marklam
+1  A: 

I'd go for IStorable

Kris
A: 

If your interface follows the repository pattern then I would go with IRepository.

If not then perhaps IDataMapper is more suitable.

d91-jal