public ActionResult DetailsByEntryType(EntryType entryType, string subType = "") { var tag = _queries.FindTagForEntryType(new EntryTypeAndSubType(entryType, subType), (tag, lang) => new TagBaseContract(tag, lang)); if (tag != null) { return(RedirectToAction("DetailsById", new { id = tag.Id, slug = tag.UrlSlug })); } else { return(RedirectToAction("Index")); } }
public TagForApiContract GetMappedTag(EntryType entryType, string subType = null, TagOptionalFields fields = TagOptionalFields.None) => _tagQueries.FindTagForEntryType(new EntryTypeAndSubType(entryType, subType), (tag, lang) => new TagForApiContract(tag, lang, fields), true);