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