Exemplo n.º 1
0
        /// <summary>
        /// Gets all available models from the specified group.
        /// </summary>
        /// <param name="group">The content group</param>
        /// <returns>The available models</returns>
        public async Task <IEnumerable <ContentType> > GetByGroupAsync(string group)
        {
            // Check if we have cache enabled
            if (_cache != null && App.CacheLevel != CacheLevel.None)
            {
                var types = await GetTypes().ConfigureAwait(false);

                return(types.Where(t => t.Group == group).ToList());
            }
            else
            {
                return(await _repo.GetByGroup(group).ConfigureAwait(false));
            }
        }