コード例 #1
0
ファイル: HomeController.cs プロジェクト: OpenId3as/nog-api
        public ItemsLinkContainer <HomeViewModel> Get()
        {
            var obj = _homeAppService.GetAll().ToList();

            obj.ForEach(x => x.AddRangeLink(_homeEnricher.CreateLinks(Method.Get, x)));
            var result = new ItemsLinkContainer <HomeViewModel>()
            {
                Items = obj
            };

            result.AddRangeLink(_homeEnricher.CreateLinks(Method.GetAll));
            return(result);
        }
コード例 #2
0
        public IActionResult GetHome(string language, string institution)
        {
            var home = _homeAppService.GetInstitutionByLanguage(language, institution);

            home?.AddRangeLink(_homeEnricher.CreateLinks(Method.Get, home));
            return(OkOrNotFound(home));
        }