public ItemsLinkContainer <LanguageViewModel> Get() { var languages = _languageAppService.GetAll().ToList(); languages.ForEach(x => x.AddRangeLink(_languageEnricher.CreateLinks(Method.Get, x))); var result = new ItemsLinkContainer <LanguageViewModel>() { Items = languages }; result.AddRangeLink(_languageEnricher.CreateLinks(Method.GetAll)); return(result); }
public IActionResult GetLanguage(string language) { var lang = _languageAppService.GetByLang(language); lang?.AddRangeLink(_languageEnricher.CreateLinks(Method.Get, lang)); return(OkOrNotFound(lang)); }