Update x velocizzare ed evitare doppioni x tag case sensitive

This commit is contained in:
Samuele Locatelli
2022-12-29 17:41:53 +01:00
parent 7f9afdf5fb
commit 02f0743456
10 changed files with 50 additions and 26 deletions
+5 -2
View File
@@ -376,7 +376,8 @@ namespace MP.FileData.Controllers
foreach (var tag in Tags)
{
var foundTag = currTags.SingleOrDefault(x => x.TagId == tag);
var foundTag = currTags.SingleOrDefault(x => x.TagId.ToLower() == tag.ToLower());
//var foundTag = currTags.SingleOrDefault(x => x.TagId == tag);
// aggiungo i tags SE non ci fossero
if (foundTag == null)
{
@@ -542,12 +543,14 @@ namespace MP.FileData.Controllers
foreach (var tag in Tags)
{
var foundTag = currTags.SingleOrDefault(x => x.TagId == tag);
var foundTag = currTags.SingleOrDefault(x => x.TagId.ToLower() == tag.ToLower());
//var foundTag = currTags.SingleOrDefault(x => x.TagId == tag);
// aggiungo i tags SE non ci fossero
if (foundTag == null)
{
var newTag = new TagModel() { TagId = tag };
currTags.Add(newTag);
//localDbCtx.SaveChanges();
Tag4File.Add(newTag);
}
else