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