/// <summary>
        /// Gets the entity definition for the supplied name.
        /// </summary>
        /// <param name="name">Name of the entity definition to return.</param>
        /// <returns>Entity definition for the supplied name.</returns>
        /// <exception cref="CacheNotInitializedException">Throws when cache provider is not initialized through constructor.</exception>
        public DSEntityType Get(string name)
        {
            if (_cache == null)
            {
                throw new CacheNotInitializedException("Cache provider is not set.");
            }

            var cacheKey = Key(name);

            if (!_cache.Contains(cacheKey))
            {
                var newEntityType = _resolver.Get(name);
                _cache.Set(cacheKey, newEntityType);
                return(newEntityType);
            }

            var entityType = _cache.Get(cacheKey) as DSEntityType;

            return(entityType);
        }