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);
}
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);
}
How about IFooRepository
, where Foo
is some base-entity or describes the product. If it truly is generic, then perhaps just IRepository<T>
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.
Did you not like any of these?
Wouldn't an interface be defining a group of operations, rather than 'an operation'?
IGateway
Then implementations are (for example): UserGateway, ArticleGateway and so on
IPersistEntities
Then you can derive class MyNewPersistenceThing : IPersistEntities
If your interface follows the repository pattern then I would go with IRepository.
If not then perhaps IDataMapper is more suitable.