Implement XFile Provider ...

This commit is contained in:
2025-12-07 16:01:07 +03:30
parent 5a4ac15f31
commit ce846b3f68
5 changed files with 1348 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
using xCommons.Extensions;
using xFileService.Models.Dtos;
using xFileService.Models.Entities;
namespace xFileService.Extensions
{
public static class xFileServiceExtensions
{
/// <summary>
/// Map Global Properties From XFile to XFile Dto ...
/// </summary>
/// <param name="source"></param>
/// <returns></returns>
public static XFileDto ToXFileDto(this XFile source)
{
//
XFileDto result = null;
//
if (!source.IsNullOrDefault())
{
//
result = new XFileDto();
result = result.UpdateData(source);
//
// result = new XFileDto
// {
// Id = source.Id,
// Type = source.Type,
// OwnerId = source.OwnerId,
// Name = source.Name,
// Path = source.Path,
// Thumb = source.Thumb,
// ThumbPath = source.ThumbPath,
// UploadedOn = source.UploadedOn,
// FileName = source.FileName
// };
}
//
return result;
}
}
}