public Tag Update(Tag tag) { tag.Label = tag.Label.ToLowerInvariant(); _repo.Update(tag); _eventAggregator.PublishEvent(new TagsUpdatedEvent()); return tag; }
public Tag Add(Tag tag) { //TODO: check for duplicate tag by label and return that tag instead? tag.Label = tag.Label.ToLowerInvariant(); _repo.Insert(tag); _eventAggregator.PublishEvent(new TagsUpdatedEvent()); return tag; }