Ejemplo n.º 1
0
        public async Task <IEnumerable <Layout> > ToList()
        {
            try
            {
                var result = await _layoutService.GetList();

                return(result.Select(x => LayoutParser.ToLayoutContract(x)));
            }
            catch (LayoutException exception)
            {
                var fault = new ServiceValidationFaultDetails {
                    Message = "Getting of list of layouts error"
                };
                throw new FaultException <ServiceValidationFaultDetails>(fault, exception.Message);
            }
        }
Ejemplo n.º 2
0
        // id is SectionType
        public ActionResult Items(string sectionType)
        {
            var items = _layoutService.GetList(sectionType);

            return(PartialView("_ItemsPartial", items));
        }