public string AddLink(TinyLinkDto tinyLinkDto) { var tinyLink = _tinyLinkRepository.Get(tinyLinkDto.Hash); if (tinyLink == null) { TinyLinkEntity tinyLinkEntity = new TinyLinkEntity { Link = tinyLinkDto.Link, Hash = tinyLinkDto.Hash, Count = 0 }; var hash = _tinyLinkRepository.Add(tinyLinkEntity); return(hash); } return(tinyLink.Hash); }
public string AddLink(TinyLinkDto tinyLinkDto) { return(_tinyLinkApplicationService.AddLink(tinyLinkDto)); }