Converts paged results to use 'long' params instead of ints and obsoletes the old ones.
This commit is contained in:
@@ -229,7 +229,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
private void RebuildXmlStructuresProcessQuery(Func<IContent, XElement> serializer, IQuery<IContent> query, Transaction tr, int pageSize)
|
||||
{
|
||||
var pageIndex = 0;
|
||||
var total = int.MinValue;
|
||||
var total = long.MinValue;
|
||||
var processed = 0;
|
||||
do
|
||||
{
|
||||
@@ -754,7 +754,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// <param name="orderDirection">Direction to order by</param>
|
||||
/// <param name="filter">Search text filter</param>
|
||||
/// <returns>An Enumerable list of <see cref="IContent"/> objects</returns>
|
||||
public IEnumerable<IContent> GetPagedResultsByQuery(IQuery<IContent> query, int pageIndex, int pageSize, out int totalRecords,
|
||||
public IEnumerable<IContent> GetPagedResultsByQuery(IQuery<IContent> query, long pageIndex, int pageSize, out long totalRecords,
|
||||
string orderBy, Direction orderDirection, string filter = "")
|
||||
{
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// <param name="orderDirection">Direction to order by</param>
|
||||
/// <param name="filter">Search text filter</param>
|
||||
/// <returns>An Enumerable list of <see cref="IContent"/> objects</returns>
|
||||
IEnumerable<IContent> GetPagedResultsByQuery(IQuery<IContent> query, int pageIndex, int pageSize, out int totalRecords,
|
||||
IEnumerable<IContent> GetPagedResultsByQuery(IQuery<IContent> query, long pageIndex, int pageSize, out long totalRecords,
|
||||
string orderBy, Direction orderDirection, string filter = "");
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// <param name="orderDirection">Direction to order by</param>
|
||||
/// <param name="filter">Search text filter</param>
|
||||
/// <returns>An Enumerable list of <see cref="IMedia"/> objects</returns>
|
||||
IEnumerable<IMedia> GetPagedResultsByQuery(IQuery<IMedia> query, int pageIndex, int pageSize, out int totalRecords,
|
||||
IEnumerable<IMedia> GetPagedResultsByQuery(IQuery<IMedia> query, long pageIndex, int pageSize, out long totalRecords,
|
||||
string orderBy, Direction orderDirection, string filter = "");
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// <param name="orderDirection"></param>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
IEnumerable<IMember> GetPagedResultsByQuery(IQuery<IMember> query, int pageIndex, int pageSize, out int totalRecords,
|
||||
IEnumerable<IMember> GetPagedResultsByQuery(IQuery<IMember> query, long pageIndex, int pageSize, out long totalRecords,
|
||||
string orderBy, Direction orderDirection, string filter = "");
|
||||
|
||||
//IEnumerable<IMember> GetPagedResultsByQuery<TDto>(
|
||||
|
||||
@@ -227,7 +227,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
private void RebuildXmlStructuresProcessQuery(Func<IMedia, XElement> serializer, IQuery<IMedia> query, Transaction tr, int pageSize)
|
||||
{
|
||||
var pageIndex = 0;
|
||||
var total = int.MinValue;
|
||||
var total = long.MinValue;
|
||||
var processed = 0;
|
||||
do
|
||||
{
|
||||
@@ -442,7 +442,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// <param name="orderDirection">Direction to order by</param>
|
||||
/// <param name="filter">Search text filter</param>
|
||||
/// <returns>An Enumerable list of <see cref="IMedia"/> objects</returns>
|
||||
public IEnumerable<IMedia> GetPagedResultsByQuery(IQuery<IMedia> query, int pageIndex, int pageSize, out int totalRecords,
|
||||
public IEnumerable<IMedia> GetPagedResultsByQuery(IQuery<IMedia> query, long pageIndex, int pageSize, out long totalRecords,
|
||||
string orderBy, Direction orderDirection, string filter = "")
|
||||
{
|
||||
var args = new List<object>();
|
||||
|
||||
@@ -472,7 +472,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
private void RebuildXmlStructuresProcessQuery(Func<IMember, XElement> serializer, IQuery<IMember> query, Transaction tr, int pageSize)
|
||||
{
|
||||
var pageIndex = 0;
|
||||
var total = int.MinValue;
|
||||
var total = long.MinValue;
|
||||
var processed = 0;
|
||||
do
|
||||
{
|
||||
@@ -642,7 +642,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// <remarks>
|
||||
/// The query supplied will ONLY work with data specifically on the cmsMember table because we are using PetaPoco paging (SQL paging)
|
||||
/// </remarks>
|
||||
public IEnumerable<IMember> GetPagedResultsByQuery(IQuery<IMember> query, int pageIndex, int pageSize, out int totalRecords,
|
||||
public IEnumerable<IMember> GetPagedResultsByQuery(IQuery<IMember> query, long pageIndex, int pageSize, out long totalRecords,
|
||||
string orderBy, Direction orderDirection, string filter = "")
|
||||
{
|
||||
var args = new List<object>();
|
||||
|
||||
@@ -274,7 +274,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// <param name="orderDirection">The order direction.</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="System.ArgumentNullException">orderBy</exception>
|
||||
protected IEnumerable<TEntity> GetPagedResultsByQuery<TDto,TContentBase>(IQuery<TEntity> query, int pageIndex, int pageSize, out int totalRecords,
|
||||
protected IEnumerable<TEntity> GetPagedResultsByQuery<TDto, TContentBase>(IQuery<TEntity> query, long pageIndex, int pageSize, out long totalRecords,
|
||||
Tuple<string, string> nodeIdSelect,
|
||||
Func<Sql, IEnumerable<TEntity>> processQuery,
|
||||
string orderBy,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
@@ -491,6 +492,29 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Use the overload with 'long' parameter types instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public IEnumerable<IContent> GetPagedChildren(int id, int pageIndex, int pageSize, out int totalChildren,
|
||||
string orderBy, Direction orderDirection, string filter = "")
|
||||
{
|
||||
Mandate.ParameterCondition(pageIndex >= 0, "pageIndex");
|
||||
Mandate.ParameterCondition(pageSize > 0, "pageSize");
|
||||
using (var repository = RepositoryFactory.CreateContentRepository(UowProvider.GetUnitOfWork()))
|
||||
{
|
||||
|
||||
var query = Query<IContent>.Builder;
|
||||
//if the id is System Root, then just get all
|
||||
if (id != Constants.System.Root)
|
||||
{
|
||||
query.Where(x => x.ParentId == id);
|
||||
}
|
||||
long total;
|
||||
var contents = repository.GetPagedResultsByQuery(query, pageIndex, pageSize, out total, orderBy, orderDirection, filter);
|
||||
totalChildren = Convert.ToInt32(total);
|
||||
return contents;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a collection of <see cref="IContent"/> objects by Parent Id
|
||||
/// </summary>
|
||||
@@ -502,7 +526,7 @@ namespace Umbraco.Core.Services
|
||||
/// <param name="orderDirection">Direction to order by</param>
|
||||
/// <param name="filter">Search text filter</param>
|
||||
/// <returns>An Enumerable list of <see cref="IContent"/> objects</returns>
|
||||
public IEnumerable<IContent> GetPagedChildren(int id, int pageIndex, int pageSize, out int totalChildren,
|
||||
public IEnumerable<IContent> GetPagedChildren(int id, long pageIndex, int pageSize, out long totalChildren,
|
||||
string orderBy, Direction orderDirection, string filter = "")
|
||||
{
|
||||
Mandate.ParameterCondition(pageIndex >= 0, "pageIndex");
|
||||
@@ -522,6 +546,28 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Use the overload with 'long' parameter types instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public IEnumerable<IContent> GetPagedDescendants(int id, int pageIndex, int pageSize, out int totalChildren, string orderBy = "Path", Direction orderDirection = Direction.Ascending, string filter = "")
|
||||
{
|
||||
Mandate.ParameterCondition(pageIndex >= 0, "pageIndex");
|
||||
Mandate.ParameterCondition(pageSize > 0, "pageSize");
|
||||
using (var repository = RepositoryFactory.CreateContentRepository(UowProvider.GetUnitOfWork()))
|
||||
{
|
||||
|
||||
var query = Query<IContent>.Builder;
|
||||
//if the id is System Root, then just get all
|
||||
if (id != Constants.System.Root)
|
||||
{
|
||||
query.Where(x => x.Path.SqlContains(string.Format(",{0},", id), TextColumnType.NVarchar));
|
||||
}
|
||||
long total;
|
||||
var contents = repository.GetPagedResultsByQuery(query, pageIndex, pageSize, out total, orderBy, orderDirection, filter);
|
||||
totalChildren = Convert.ToInt32(total);
|
||||
return contents;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a collection of <see cref="IContent"/> objects by Parent Id
|
||||
/// </summary>
|
||||
@@ -533,7 +579,7 @@ namespace Umbraco.Core.Services
|
||||
/// <param name="orderDirection">Direction to order by</param>
|
||||
/// <param name="filter">Search text filter</param>
|
||||
/// <returns>An Enumerable list of <see cref="IContent"/> objects</returns>
|
||||
public IEnumerable<IContent> GetPagedDescendants(int id, int pageIndex, int pageSize, out int totalChildren, string orderBy = "Path", Direction orderDirection = Direction.Ascending, string filter = "")
|
||||
public IEnumerable<IContent> GetPagedDescendants(int id, long pageIndex, int pageSize, out long totalChildren, string orderBy = "Path", Direction orderDirection = Direction.Ascending, string filter = "")
|
||||
{
|
||||
Mandate.ParameterCondition(pageIndex >= 0, "pageIndex");
|
||||
Mandate.ParameterCondition(pageSize > 0, "pageSize");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
@@ -401,6 +402,30 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Use the overload with 'long' parameter types instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public IEnumerable<IMedia> GetPagedChildren(int id, int pageIndex, int pageSize, out int totalChildren,
|
||||
string orderBy, Direction orderDirection, string filter = "")
|
||||
{
|
||||
Mandate.ParameterCondition(pageIndex >= 0, "pageIndex");
|
||||
Mandate.ParameterCondition(pageSize > 0, "pageSize");
|
||||
using (var repository = RepositoryFactory.CreateMediaRepository(UowProvider.GetUnitOfWork()))
|
||||
{
|
||||
var query = Query<IMedia>.Builder;
|
||||
//if the id is -1, then just get all
|
||||
if (id != -1)
|
||||
{
|
||||
query.Where(x => x.ParentId == id);
|
||||
}
|
||||
|
||||
long total;
|
||||
var medias = repository.GetPagedResultsByQuery(query, pageIndex, pageSize, out total, orderBy, orderDirection, filter);
|
||||
|
||||
totalChildren = Convert.ToInt32(total);
|
||||
return medias;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a collection of <see cref="IMedia"/> objects by Parent Id
|
||||
/// </summary>
|
||||
@@ -412,7 +437,7 @@ namespace Umbraco.Core.Services
|
||||
/// <param name="orderDirection">Direction to order by</param>
|
||||
/// <param name="filter">Search text filter</param>
|
||||
/// <returns>An Enumerable list of <see cref="IContent"/> objects</returns>
|
||||
public IEnumerable<IMedia> GetPagedChildren(int id, int pageIndex, int pageSize, out int totalChildren,
|
||||
public IEnumerable<IMedia> GetPagedChildren(int id, long pageIndex, int pageSize, out long totalChildren,
|
||||
string orderBy, Direction orderDirection, string filter = "")
|
||||
{
|
||||
Mandate.ParameterCondition(pageIndex >= 0, "pageIndex");
|
||||
@@ -431,6 +456,28 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Use the overload with 'long' parameter types instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public IEnumerable<IMedia> GetPagedDescendants(int id, int pageIndex, int pageSize, out int totalChildren, string orderBy = "Path", Direction orderDirection = Direction.Ascending, string filter = "")
|
||||
{
|
||||
Mandate.ParameterCondition(pageIndex >= 0, "pageIndex");
|
||||
Mandate.ParameterCondition(pageSize > 0, "pageSize");
|
||||
using (var repository = RepositoryFactory.CreateMediaRepository(UowProvider.GetUnitOfWork()))
|
||||
{
|
||||
|
||||
var query = Query<IMedia>.Builder;
|
||||
//if the id is -1, then just get all
|
||||
if (id != -1)
|
||||
{
|
||||
query.Where(x => x.Path.SqlContains(string.Format(",{0},", id), TextColumnType.NVarchar));
|
||||
}
|
||||
long total;
|
||||
var contents = repository.GetPagedResultsByQuery(query, pageIndex, pageSize, out total, orderBy, orderDirection, filter);
|
||||
totalChildren = Convert.ToInt32(total);
|
||||
return contents;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a collection of <see cref="IContent"/> objects by Parent Id
|
||||
/// </summary>
|
||||
@@ -442,7 +489,7 @@ namespace Umbraco.Core.Services
|
||||
/// <param name="orderDirection">Direction to order by</param>
|
||||
/// <param name="filter">Search text filter</param>
|
||||
/// <returns>An Enumerable list of <see cref="IContent"/> objects</returns>
|
||||
public IEnumerable<IMedia> GetPagedDescendants(int id, int pageIndex, int pageSize, out int totalChildren, string orderBy = "Path", Direction orderDirection = Direction.Ascending, string filter = "")
|
||||
public IEnumerable<IMedia> GetPagedDescendants(int id, long pageIndex, int pageSize, out long totalChildren, string orderBy = "Path", Direction orderDirection = Direction.Ascending, string filter = "")
|
||||
{
|
||||
Mandate.ParameterCondition(pageIndex >= 0, "pageIndex");
|
||||
Mandate.ParameterCondition(pageSize > 0, "pageSize");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Threading;
|
||||
using System.Web.Security;
|
||||
using System.Xml.Linq;
|
||||
@@ -269,6 +270,16 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Use the overload with 'long' parameter types instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public IEnumerable<IMember> FindMembersByDisplayName(string displayNameToMatch, int pageIndex, int pageSize, out int totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
|
||||
{
|
||||
long total;
|
||||
var result = FindMembersByDisplayName(displayNameToMatch, Convert.ToInt64(pageIndex), pageSize, out total, matchType);
|
||||
totalRecords = Convert.ToInt32(total);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds Members based on their display name
|
||||
/// </summary>
|
||||
@@ -278,7 +289,7 @@ namespace Umbraco.Core.Services
|
||||
/// <param name="totalRecords">Total number of records found (out)</param>
|
||||
/// <param name="matchType">The type of match to make as <see cref="StringPropertyMatchType"/>. Default is <see cref="StringPropertyMatchType.StartsWith"/></param>
|
||||
/// <returns><see cref="IEnumerable{IMember}"/></returns>
|
||||
public IEnumerable<IMember> FindMembersByDisplayName(string displayNameToMatch, int pageIndex, int pageSize, out int totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
|
||||
public IEnumerable<IMember> FindMembersByDisplayName(string displayNameToMatch, long pageIndex, int pageSize, out long totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
|
||||
{
|
||||
var uow = UowProvider.GetUnitOfWork();
|
||||
using (var repository = RepositoryFactory.CreateMemberRepository(uow))
|
||||
@@ -310,6 +321,16 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Use the overload with 'long' parameter types instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public IEnumerable<IMember> FindByEmail(string emailStringToMatch, int pageIndex, int pageSize, out int totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
|
||||
{
|
||||
long total;
|
||||
var result = FindByEmail(emailStringToMatch, Convert.ToInt64(pageIndex), pageSize, out total, matchType);
|
||||
totalRecords = Convert.ToInt32(total);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds a list of <see cref="IMember"/> objects by a partial email string
|
||||
/// </summary>
|
||||
@@ -319,7 +340,7 @@ namespace Umbraco.Core.Services
|
||||
/// <param name="totalRecords">Total number of records found (out)</param>
|
||||
/// <param name="matchType">The type of match to make as <see cref="StringPropertyMatchType"/>. Default is <see cref="StringPropertyMatchType.StartsWith"/></param>
|
||||
/// <returns><see cref="IEnumerable{IMember}"/></returns>
|
||||
public IEnumerable<IMember> FindByEmail(string emailStringToMatch, int pageIndex, int pageSize, out int totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
|
||||
public IEnumerable<IMember> FindByEmail(string emailStringToMatch, long pageIndex, int pageSize, out long totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
|
||||
{
|
||||
var uow = UowProvider.GetUnitOfWork();
|
||||
using (var repository = RepositoryFactory.CreateMemberRepository(uow))
|
||||
@@ -351,6 +372,16 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Use the overload with 'long' parameter types instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public IEnumerable<IMember> FindByUsername(string login, int pageIndex, int pageSize, out int totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
|
||||
{
|
||||
long total;
|
||||
var result = FindByUsername(login, Convert.ToInt64(pageIndex), pageSize, out total, matchType);
|
||||
totalRecords = Convert.ToInt32(total);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds a list of <see cref="IMember"/> objects by a partial username
|
||||
/// </summary>
|
||||
@@ -360,7 +391,7 @@ namespace Umbraco.Core.Services
|
||||
/// <param name="totalRecords">Total number of records found (out)</param>
|
||||
/// <param name="matchType">The type of match to make as <see cref="StringPropertyMatchType"/>. Default is <see cref="StringPropertyMatchType.StartsWith"/></param>
|
||||
/// <returns><see cref="IEnumerable{IMember}"/></returns>
|
||||
public IEnumerable<IMember> FindByUsername(string login, int pageIndex, int pageSize, out int totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
|
||||
public IEnumerable<IMember> FindByUsername(string login, long pageIndex, int pageSize, out long totalRecords, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
|
||||
{
|
||||
var uow = UowProvider.GetUnitOfWork();
|
||||
using (var repository = RepositoryFactory.CreateMemberRepository(uow))
|
||||
@@ -663,6 +694,16 @@ namespace Umbraco.Core.Services
|
||||
|
||||
}
|
||||
|
||||
[Obsolete("Use the overload with 'long' parameter types instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public IEnumerable<IMember> GetAll(int pageIndex, int pageSize, out int totalRecords)
|
||||
{
|
||||
long total;
|
||||
var result = GetAll(Convert.ToInt64(pageIndex), pageSize, out total);
|
||||
totalRecords = Convert.ToInt32(total);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of paged <see cref="IMember"/> objects
|
||||
/// </summary>
|
||||
@@ -670,7 +711,7 @@ namespace Umbraco.Core.Services
|
||||
/// <param name="pageSize">Size of the page</param>
|
||||
/// <param name="totalRecords">Total number of records found (out)</param>
|
||||
/// <returns><see cref="IEnumerable{IMember}"/></returns>
|
||||
public IEnumerable<IMember> GetAll(int pageIndex, int pageSize, out int totalRecords)
|
||||
public IEnumerable<IMember> GetAll(long pageIndex, int pageSize, out long totalRecords)
|
||||
{
|
||||
var uow = UowProvider.GetUnitOfWork();
|
||||
using (var repository = RepositoryFactory.CreateMemberRepository(uow))
|
||||
@@ -679,8 +720,19 @@ namespace Umbraco.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Use the overload with 'long' parameter types instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public IEnumerable<IMember> GetAll(int pageIndex, int pageSize, out int totalRecords,
|
||||
string orderBy, Direction orderDirection, string memberTypeAlias = null, string filter = "")
|
||||
{
|
||||
long total;
|
||||
var result = GetAll(Convert.ToInt64(pageIndex), pageSize, out total, orderBy, orderDirection, memberTypeAlias, filter);
|
||||
totalRecords = Convert.ToInt32(total);
|
||||
return result;
|
||||
}
|
||||
|
||||
public IEnumerable<IMember> GetAll(long pageIndex, int pageSize, out long totalRecords,
|
||||
string orderBy, Direction orderDirection, string memberTypeAlias = null, string filter = "")
|
||||
{
|
||||
var uow = UowProvider.GetUnitOfWork();
|
||||
using (var repository = RepositoryFactory.CreateMemberRepository(uow))
|
||||
|
||||
@@ -442,7 +442,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IContent>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 0, 1, out totalRecords, "Name", Direction.Ascending);
|
||||
|
||||
// Assert
|
||||
@@ -463,7 +463,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IContent>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 1, 1, out totalRecords, "Name", Direction.Ascending);
|
||||
|
||||
// Assert
|
||||
@@ -484,7 +484,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IContent>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 0, 2, out totalRecords, "Name", Direction.Ascending);
|
||||
|
||||
// Assert
|
||||
@@ -505,7 +505,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IContent>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 0, 1, out totalRecords, "Name", Direction.Descending);
|
||||
|
||||
// Assert
|
||||
@@ -526,7 +526,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IContent>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 0, 1, out totalRecords, "Name", Direction.Ascending, "Page 2");
|
||||
|
||||
// Assert
|
||||
@@ -547,7 +547,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IContent>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 0, 1, out totalRecords, "Name", Direction.Ascending, "Page");
|
||||
|
||||
// Assert
|
||||
|
||||
@@ -317,7 +317,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IMedia>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 0, 1, out totalRecords, "SortOrder", Direction.Ascending);
|
||||
|
||||
// Assert
|
||||
@@ -338,7 +338,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IMedia>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 1, 1, out totalRecords, "SortOrder", Direction.Ascending);
|
||||
|
||||
// Assert
|
||||
@@ -359,7 +359,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IMedia>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 0, 2, out totalRecords, "SortOrder", Direction.Ascending);
|
||||
|
||||
// Assert
|
||||
@@ -380,7 +380,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IMedia>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 0, 1, out totalRecords, "SortOrder", Direction.Descending);
|
||||
|
||||
// Assert
|
||||
@@ -401,7 +401,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IMedia>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 0, 1, out totalRecords, "Name", Direction.Ascending);
|
||||
|
||||
// Assert
|
||||
@@ -422,7 +422,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IMedia>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 0, 1, out totalRecords, "SortOrder", Direction.Ascending, "File");
|
||||
|
||||
// Assert
|
||||
@@ -443,7 +443,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
// Act
|
||||
var query = Query<IMedia>.Builder.Where(x => x.Level == 2);
|
||||
int totalRecords;
|
||||
long totalRecords;
|
||||
var result = repository.GetPagedResultsByQuery(query, 0, 1, out totalRecords, "SortOrder", Direction.Ascending, "Test");
|
||||
|
||||
// Assert
|
||||
|
||||
Reference in New Issue
Block a user