示例#1
0
        public ActionResult List(string filterButton)
        {
            object button;

            if (Enum.TryParse(typeof(Models.Types), filterButton, out button))
            {
                Models.Types types = (Models.Types)button;
                _model = new OntologyViewModel(_cache, types);
                return(base.View(_model));
            }

            _model = new OntologyViewModel(_cache, null);
            return(View(_model));
        }
        public static IEnumerable <Models.Type> GetTypeListFromCache(Models.Types listType, IMemoryCache memoryCache)
        {
            var types = GetFromCache(memoryCache, listType, Context.None);

            return(types != null ? (IEnumerable <Models.Type>)types : null);
        }