src/Misc/EFTools/EntityDesignDatabaseGeneration/EdmExtensions.cs
/// <summary>
///     Converts a string representation of store schema definition language (SSDL) to a <see cref="StoreItemCollection" />.
/// </summary>
/// <param name="ssdl">SSDL as a string.</param>
/// <param name="targetFrameworkVersion">The targeted version of the Entity Framework.</param>
/// <param name="resolver">The dependency resolver to use for loading required dependencies.</param>
/// <param name="edmErrors">An output parameter that contains a list of errors that occurred during the generation of the StoreItemCollection.</param>
/// <returns>
///     SSDL as a <see cref="StoreItemCollection" />.
/// </returns>
Converts a string representation of store schema definition language (SSDL) to a .
Converts a string representation of store schema definition language ( SSDL ) to a .
[SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times")]
        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "3#")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "ssdl")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "edm")]
        public static StoreItemCollection CreateStoreItemCollection(
            string ssdl, Version targetFrameworkVersion, IDbDependencyResolver resolver, out IList<EdmSchemaError> edmErrors)
        {
            if (ssdl == null)
            {
                throw new ArgumentNullException("ssdl");
            }
            if (targetFrameworkVersion == null)
            {
                throw new ArgumentNullException("targetFrameworkVersion");
            }
            if (!EntityFrameworkVersion.IsValidVersion(targetFrameworkVersion))
            {
                throw new ArgumentException(
                    string.Format(CultureInfo.CurrentCulture, Resources.ErrorNonValidTargetVersion, targetFrameworkVersion),
                    "targetFrameworkVersion");
            }
            using (var textReader = new StringReader(ssdl))
            {
                using (var ssdlReader = XmlReader.Create(textReader))
                {
                    return StoreItemCollection.Create(new[] { ssdlReader }, null, resolver, out edmErrors);
                }
            }
        }
[ SuppressMessage ( " " , " " ) ] [ SuppressMessage ( " " , " " , MessageId = " " ) ] [ SuppressMessage ( " " , " " , MessageId = " " ) ] [ SuppressMessage ( " " , " " , MessageId = " " ) ] public static StoreItemCollection CreateStoreItemCollection ( string ssdl , Version targetFrameworkVersion , IDbDependencyResolver resolver , out IList < EdmSchemaError > edmErrors ) { if ( ssdl == null ) { throw new ArgumentNullException ( " " ) ; } if ( targetFrameworkVersion == null ) { throw new ArgumentNullException ( " " ) ; } if ( ! EntityFrameworkVersion . IsValidVersion ( targetFrameworkVersion ) ) { throw new ArgumentException ( string . Format ( CultureInfo . CurrentCulture , Resources . ErrorNonValidTargetVersion , targetFrameworkVersion ) , " " ) ; } using ( var textReader = new StringReader ( ssdl ) ) { using ( var ssdlReader = XmlReader . Create ( textReader ) ) { return StoreItemCollection . Create ( new [ ] { ssdlReader } , null , resolver , out edmErrors ) ; } } }
Converts a string representation of store schema definition language (SSDL) to a .
Converts a string representation of store schema definition language ( SSDL ) to a .
SSDL as a .
SSDL as a .
ssdl
string
SSDL as a string.
SSDL as a string .
targetFrameworkVersion
Version
The targeted version of the Entity Framework.
The targeted version of the Entity Framework .
resolver
IDbDependencyResolver
The dependency resolver to use for loading required dependencies.
The dependency resolver to use for loading required dependencies .
IList<EdmSchemaError>
out
edmErrors
An output parameter that contains a list of errors that occurred during the generation of the StoreItemCollection.
An output parameter that contains a list of errors that occurred during the generation of the StoreItemCollection .