last ...
This commit is contained in:
@@ -747,7 +747,7 @@ namespace xCategoryService.Providers
|
|||||||
// Add Descriptions ...
|
// Add Descriptions ...
|
||||||
await descriptionResourceProvider.AddOrUpdateLocale(
|
await descriptionResourceProvider.AddOrUpdateLocale(
|
||||||
identifier: id,
|
identifier: id,
|
||||||
locale: locale,
|
locale: desLocale,
|
||||||
connectionId: null,
|
connectionId: null,
|
||||||
cancellationToken: cancellationToken
|
cancellationToken: cancellationToken
|
||||||
);
|
);
|
||||||
@@ -782,6 +782,10 @@ namespace xCategoryService.Providers
|
|||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Handle Update ...
|
// Handle Update ...
|
||||||
|
result = await GetResource(
|
||||||
|
id: id,
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
#region Remove ...
|
#region Remove ...
|
||||||
@@ -823,7 +827,12 @@ namespace xCategoryService.Providers
|
|||||||
//
|
//
|
||||||
// Titles ...
|
// Titles ...
|
||||||
var updateTitles = result.Titles.Locales.Where(
|
var updateTitles = result.Titles.Locales.Where(
|
||||||
l => resource.Titles.Locales.Any(r => r.Language.Equals(l.Language, System.StringComparison.InvariantCultureIgnoreCase))
|
l => resource.Titles.Locales.Any(r =>
|
||||||
|
r.Value
|
||||||
|
.Equals(l.Value, StringComparison.InvariantCultureIgnoreCase) &&
|
||||||
|
r.Language
|
||||||
|
.Equals(l.Language, StringComparison.InvariantCultureIgnoreCase)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
foreach (var locale in updateTitles)
|
foreach (var locale in updateTitles)
|
||||||
{
|
{
|
||||||
@@ -839,7 +848,11 @@ namespace xCategoryService.Providers
|
|||||||
//
|
//
|
||||||
// Descriptions ...
|
// Descriptions ...
|
||||||
var updateDescriptions = result.Descriptions.Locales.Where(
|
var updateDescriptions = result.Descriptions.Locales.Where(
|
||||||
l => resource.Descriptions.Locales.Any(r => r.Language.Equals(l.Language, System.StringComparison.InvariantCultureIgnoreCase))
|
l => resource.Descriptions.Locales.Any(r =>
|
||||||
|
r.Value
|
||||||
|
.Equals(l.Value, StringComparison.InvariantCultureIgnoreCase) &&
|
||||||
|
r.Language
|
||||||
|
.Equals(l.Language, StringComparison.InvariantCultureIgnoreCase))
|
||||||
);
|
);
|
||||||
foreach (var locale in updateDescriptions)
|
foreach (var locale in updateDescriptions)
|
||||||
{
|
{
|
||||||
@@ -858,7 +871,7 @@ namespace xCategoryService.Providers
|
|||||||
//
|
//
|
||||||
// Titles ...
|
// Titles ...
|
||||||
var newTitles = resource.Titles.Locales.Where(
|
var newTitles = resource.Titles.Locales.Where(
|
||||||
l => !result.Titles.Locales.Any(r => r.Language.Equals(l.Language, System.StringComparison.InvariantCultureIgnoreCase))
|
l => !result.Titles.Locales.Any(r => r.Language.Equals(l.Language, StringComparison.InvariantCultureIgnoreCase))
|
||||||
);
|
);
|
||||||
foreach (var locale in newTitles)
|
foreach (var locale in newTitles)
|
||||||
{
|
{
|
||||||
@@ -874,7 +887,7 @@ namespace xCategoryService.Providers
|
|||||||
//
|
//
|
||||||
// Descriptions ...
|
// Descriptions ...
|
||||||
var newDescriptions = resource.Descriptions.Locales.Where(
|
var newDescriptions = resource.Descriptions.Locales.Where(
|
||||||
l => !result.Descriptions.Locales.Any(r => r.Language.Equals(l.Language, System.StringComparison.InvariantCultureIgnoreCase))
|
l => !result.Descriptions.Locales.Any(r => r.Language.Equals(l.Language, StringComparison.InvariantCultureIgnoreCase))
|
||||||
);
|
);
|
||||||
foreach (var locale in newDescriptions)
|
foreach (var locale in newDescriptions)
|
||||||
{
|
{
|
||||||
@@ -929,7 +942,6 @@ namespace xCategoryService.Providers
|
|||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get All Resources as Async Enumerable ...
|
/// Get All Resources as Async Enumerable ...
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user