This commit is contained in:
2025-12-20 01:25:10 +03:30
parent 1ea040770e
commit 7dfe153d92
+28
View File
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Xml;
using xCommons.Extensions;
using xDataService.Extensions;
using xDataService.Models;
@@ -132,6 +133,33 @@ namespace xTagService.Providers
return await Task.FromResult(result);
}
/// <summary>
/// Extract all Referencing Models for Specified Key ...
/// </summary>
/// <param name="providedForId"></param>
/// <returns></returns>
public async Task<IEnumerable<XReference<TKey>>> GetAllReferencings(TKey providedForId)
{
//
// Validate ...
var isValid =
!providedForId.IsNull();
if (!isValid)
{
xExceptios.InvalidArgs.Throw();
}
//
var identifier = GetProvidedID(providedForId);
//
var result = TagProvider.Repository
.AsQueryable()
.Where(te => te.References.Contains(identifier))
.Select(te => te.References)
;
}
/// <summary>
/// Count References ...
/// </summary>