We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 495f39d commit 5b21df4Copy full SHA for 5b21df4
Blog/Blog/Models/Repositories/TagRepository.cs
@@ -37,7 +37,7 @@ public void Create(Tag entity)
37
38
public void Create(string tag)
39
{
40
- if (context.Tags.Count(x => x.Name.CompareTo(tag) == 0) == 0)
+ if (context.Tags.Count(x => x.Name == tag.Trim()) == 0)
41
context.Tags.Add(new Tag() { Name = tag.Trim() });
42
}
43
0 commit comments