Move repository interfaces to Core

This commit is contained in:
Paul Johnson
2022-01-13 23:22:19 +00:00
parent eb841a7b98
commit 44261589ae
16 changed files with 39 additions and 29 deletions

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using NPoco;
using Umbraco.Cms.Core.Models.Entities;
using Umbraco.Cms.Core.Persistence.Querying;
using Umbraco.Cms.Core.Persistence.Repositories;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Infrastructure.Persistence.Repositories
{
public interface IEntityRepositoryExtended : IEntityRepository
{
/// <summary>
/// Gets paged entities for a query and a subset of object types
/// </summary>
/// <param name="query"></param>
/// <param name="objectTypes"></param>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="totalRecords"></param>
/// <param name="filter"></param>
/// <param name="ordering"></param>
/// <param name="sqlCustomization">
/// A callback providing the ability to customize the generated SQL used to retrieve entities
/// </param>
/// <returns>
/// A collection of mixed entity types which would be of type <see cref="IEntitySlim"/>, <see cref="IDocumentEntitySlim"/>, <see cref="IMediaEntitySlim"/>,
/// <see cref="IMemberEntitySlim"/>
/// </returns>
IEnumerable<IEntitySlim> GetPagedResultsByQuery(
IQuery<IUmbracoEntity> query, Guid[] objectTypes, long pageIndex, int pageSize, out long totalRecords,
IQuery<IUmbracoEntity> filter, Ordering ordering, Action<Sql<ISqlContext>> sqlCustomization = null);
}
}