namespace Kit.Helpers.Repository.Xml
{
    public interface IPersistentKey<TKey>
    {
        TKey PersistentKey { get; }
    }

    public interface IInt32PersistentKey : IPersistentKey<int> { }

    public interface ISelectRepository<TEntity, TFilter>
    {
        IEnumerable<TEntity> Select(TFilter filter);

        int Count(TFilter filter);
        IEnumerable<TEntity> Select(TFilter filter, int page, int sizepage);
    }

    public class NothingFilter { }

    public interface IPersistentRepository<TEntity, TKey, TFilter> : ISelectRepository<TEntity, TFilter>
    {
        TKey Insert(TEntity entity);
        void Update(TKey key, TEntity entity);
        void Delete(TKey key);
        TEntity Get(TKey key);
        // IEnumerable<TEntity> Get(IEnumerable<TKey> keys);
    }

    public interface IPersistentRepository<TEntity, TFilter> : IPersistentRepository<TEntity, int, TFilter>
    {
    }
}
