Fixes: U4-4005 Member custom properties not saving from code, only from backend, wraps more of the getter functions in legacy member class with new member service methods, fixes paged result method when there are no results.

This commit is contained in:
Shannon
2014-01-13 18:36:08 +11:00
parent 23b0c89848
commit e74e8f9d73
6 changed files with 62 additions and 92 deletions

View File

@@ -151,6 +151,21 @@ namespace Umbraco.Core.Persistence.Caching
_keyTracker.Remove(key);
}
public void Delete(Type type, int entityId)
{
var key = GetCompositeId(type, entityId);
if (_memoryCache != null)
{
_memoryCache.Remove(key);
}
else
{
HttpRuntime.Cache.Remove(key);
}
_keyTracker.Remove(key);
}
/// <summary>
/// Clear cache by type
/// </summary>

View File

@@ -512,6 +512,10 @@ namespace Umbraco.Core.Persistence.Repositories
totalRecords = Convert.ToInt32(pagedResult.TotalItems);
//now that we have the member dto's we need to construct true members from the list.
if (totalRecords == 0)
{
return Enumerable.Empty<IMember>();
}
var result = GetAll(pagedResult.Items.Select(x => x.NodeId).ToArray());
//now we need to ensure this result is also ordered by the same order by clause

View File

@@ -298,6 +298,11 @@ namespace Umbraco.Core.Persistence.Repositories
totalRecords = Convert.ToInt32(pagedResult.TotalItems);
//now that we have the user dto's we need to construct true members from the list.
if (totalRecords == 0)
{
return Enumerable.Empty<IUser>();
}
var result = GetAll(pagedResult.Items.Select(x => x.Id).ToArray());
//now we need to ensure this result is also ordered by the same order by clause