2017-12-07 16:45:25 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
2021-02-18 11:06:02 +01:00
|
|
|
|
namespace Umbraco.Cms.Core.Persistence
|
2017-12-07 16:45:25 +01:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Defines the base implementation of a reading repository.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public interface IReadRepository<in TId, out TEntity> : IRepository
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets an entity.
|
|
|
|
|
|
/// </summary>
|
2022-02-10 10:32:45 +01:00
|
|
|
|
TEntity? Get(TId? id);
|
2017-12-07 16:45:25 +01:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets entities.
|
|
|
|
|
|
/// </summary>
|
2022-02-27 21:20:50 +01:00
|
|
|
|
IEnumerable<TEntity> GetMany(params TId[]? ids);
|
2017-12-07 16:45:25 +01:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets a value indicating whether an entity exists.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
bool Exists(TId id);
|
|
|
|
|
|
}
|
2021-02-18 11:06:02 +01:00
|
|
|
|
}
|