/// <see cref="ITagService.AddTagLinks(TagsTizerModel)"/> public bool AddTagLinks(TagsTizerModel model) { _tagRepository.DeletePersonDescriptionTags(model.IdTizer); if (model.Tags.Count < 1) { return(true); } var list = model.Tags.Select(o => TagModelHelper.GetTagLink(model.IdTizer, o)); var response = list.Select(link => _tagRepository.AddTagLink(link)) .All(taglink => taglink != null); return(response); }
/// <see cref="ITagService.AddTagLinks(TagsPersonMediaModel)"/> public bool AddTagLinks(TagsPersonMediaModel model) { _tagRepository.DeletePersonMediaTags(model.IdMedia); if (!model.Tags.Any()) { return(true); } var list = TagModelHelper.GetTagLink(model); var response = list.Select(link => _tagRepository.AddTagLink(link)) .All(taglink => taglink != null); return(response); }
/// <see cref="ITagService.AddTagLinks(PersonTagModel)"/> public bool AddTagLinks(PersonTagModel model) { _tagRepository.DeletePersonTags(model.personId); if (model.models == null || !model.models.Any()) { return(true); } var list = TagModelHelper.GetTagLink(model.personId, model.models); var response = list.Select(link => _tagRepository.AddTagLink(link)) .All(taglink => taglink != null); return(response); }
/// <see cref="ITagService.AddTagLinks(TagsAntroModel)"/> public bool AddTagLinks(TagsAntroModel model) { if (model.IdAntroName == 0) { return(true); } _tagRepository.DeletePersonAntroTags(model.IdPerson, model.IdAntroName, model.IsMoreThan, model.Value); if (model.Tags.Length < 1) { return(true); } var list = model.Tags.Select(o => TagModelHelper.GetTagLink(model, o)); var response = list.Select(link => _tagRepository.AddTagLink(link)) .All(taglink => taglink != null); return(response); }