last ...
This commit is contained in:
@@ -77,7 +77,7 @@ namespace xFileService.Interfaces
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<Guid>> RemoveFile(
|
||||
Task<IEnumerable<Guid>> RemoveFiles(
|
||||
TKey forProvidedId,
|
||||
string ids = null,
|
||||
string connectionId = null,
|
||||
|
||||
@@ -246,11 +246,11 @@ namespace xFileService.Providers
|
||||
/// Remove Specified Files ...
|
||||
/// </summary>
|
||||
/// <param name="providedForId"></param>
|
||||
/// <param name="ids"></param>
|
||||
/// <param name="ids">if null, Remove all Files</param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IEnumerable<Guid>> RemoveFile(
|
||||
public async Task<IEnumerable<Guid>> RemoveFiles(
|
||||
TKey providedForId,
|
||||
string ids = null,
|
||||
string connectionId = null,
|
||||
@@ -274,14 +274,26 @@ namespace xFileService.Providers
|
||||
idsList = ids
|
||||
.ParseListGuid()
|
||||
.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
var identifier = GetProvidedID(providedForId);
|
||||
|
||||
//
|
||||
// Select All Referenced Files ...
|
||||
idsList = FileProvider.FileRepository
|
||||
.AsQueryable()
|
||||
.Where(f => f.References.Contains(identifier))
|
||||
.Select(f => f.Id)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve Entities ...
|
||||
entities = FileProvider.FileRepository
|
||||
.AsQueryable()
|
||||
.Where(d => !idsList.Contains(d.Id) &&
|
||||
.Where(d => idsList.Contains(d.Id) &&
|
||||
d.References.Contains(Provider));
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user