#403 processing ftp uploads
This commit is contained in:
parent
15ab2e44be
commit
e1aecad4d1
@ -18541,6 +18541,13 @@
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.Implementation.QueuedFTPUploadService.GetQueuedFTPUploadsAsync(RSecurityBackend.Models.Generic.PagingParameterModel)">
|
||||
<summary>
|
||||
get queued ftp uploads
|
||||
</summary>
|
||||
<param name="paging"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:RMuseum.Services.Implementation.QueuedFTPUploadService._context">
|
||||
<summary>
|
||||
Database Context
|
||||
|
||||
@ -5,6 +5,7 @@ using RMuseum.DbContext;
|
||||
using RMuseum.Models.ExternalFTPUpload;
|
||||
using RSecurityBackend.Models.Generic;
|
||||
using RSecurityBackend.Services;
|
||||
using RSecurityBackend.Services.Implementation;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@ -174,6 +175,30 @@ namespace RMuseum.Services.Implementation
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// get queued ftp uploads
|
||||
/// </summary>
|
||||
/// <param name="paging"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public async Task<RServiceResult<(PaginationMetadata PagingMeta, QueuedFTPUpload[] Items)>> GetQueuedFTPUploadsAsync(PagingParameterModel paging)
|
||||
{
|
||||
try
|
||||
{
|
||||
var source =
|
||||
_context.QueuedFTPUploads.AsNoTracking()
|
||||
.OrderBy(t => t.QueueDate)
|
||||
.AsQueryable();
|
||||
(PaginationMetadata PagingMeta, QueuedFTPUpload[] Items) paginatedResult =
|
||||
await QueryablePaginator<QueuedFTPUpload>.Paginate(source, paging);
|
||||
return new RServiceResult<(PaginationMetadata PagingMeta, QueuedFTPUpload[] Items)>(paginatedResult);
|
||||
}
|
||||
catch (Exception exp)
|
||||
{
|
||||
return new RServiceResult<(PaginationMetadata PagingMeta, QueuedFTPUpload[] Items)>((null, null), exp.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Database Context
|
||||
/// </summary>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user