예제 #1
0
        public ActionResult <Definition> Get(string id)
        {
            var result = _service.GetDefinition(id);

            if (result == null)
            {
                return(NotFound());
            }

            return(Ok(result));
        }
        public IActionResult Index()
        {
            ViewBag.CurrentPage = "AboutUs";
            var model = new AboutUsModel
            {
                definition = _definitionService.GetDefinition(),
                customers  = _customerService.GetAll()
            };

            return(View(model));
        }
        public ActionResult Index()
        {
            ViewBag.CurrentPage = "Contact";

            var model = new ContactModel
            {
                Definition = _definitionService.GetDefinition()
            };

            return(View(model));
        }
 public LayoutHeadViewComponent(IDefinitionService definitionService)
 {
     _definition = definitionService.GetDefinition();
 }
예제 #5
0
 public HeaderViewComponent(IDefinitionService definitionService)
 {
     _definition = definitionService.GetDefinition();
 }
예제 #6
0
 public FooterViewComponent(IDefinitionService definitionService, IPageService pageService)
 {
     _definition = definitionService.GetDefinition();
     _services   = pageService.GetAll(PageType.Services);
 }