apply some Updates ...

This commit is contained in:
2025-12-08 14:12:47 +03:30
parent 7e308b82a7
commit e3945276a3
2 changed files with 43 additions and 0 deletions
+7
View File
@@ -182,6 +182,13 @@ namespace xTagService.Interfaces
int id
);
/// <summary>
/// Remove All Specified Tags ...
/// </summary>
/// <param name="forProvidedId"></param>
/// <returns></returns>
Task<bool> RemoveTagsFor(TKey forProvidedId);
/// <summary>
/// Update Specified Dto ...
/// </summary>
+36
View File
@@ -863,6 +863,42 @@ namespace xTagService.Providers
return result;
}
/// <summary>
/// Remove All Specified Tags ...
/// </summary>
/// <param name="forProvidedId"></param>
/// <returns></returns>
public async Task<bool> RemoveTagsFor(TKey forProvidedId)
{
//
var result = false;
//
var dtos = await GetTags(forProvidedId);
result = !dtos.IsNull() && dtos.HasChild();
if (result)
{
//
foreach (var dto in dtos)
{
//
try
{
//
await Detach(dto.Tag, forProvidedId);
if (!result)
{
result = true;
}
}
catch { }
}
}
//
return result;
}
/// <summary>
/// Update Specified Dto ...
/// </summary>