src/Misc/EFTools/EntityDesign/VisualStudio/Package/ConnectionManager.cs
// <summary>
//     Helper to wrap the given sql connection string with a entity client connection string and return it
// </summary>
// <param name="sqlConnectionString">sql connection string</param>
// <returns>map connection string containing the sql connection string</returns>
Helper to wrap the given sql connection string with a entity client connection string and return it
Helper to wrap the given sql connection string with a entity client connection string and return it
internal static ConnectionString ConstructConnectionStringObject(
            string sqlConnectionString, string providerInvariantName,
            IEnumerable<string> metadataFiles, Project project, VisualStudioProjectSystem applicationType)
        {
            if (null == sqlConnectionString)
            {
                throw new ArgumentNullException("sqlConnectionString");
            }
            if (String.IsNullOrEmpty(providerInvariantName))
            {
                throw new ArgumentNullException("providerInvariantName");
            }
            if (project == null)
            {
                throw new ArgumentNullException("project");
            }
            var builder = new EntityConnectionStringBuilder
            {
                Provider = providerInvariantName,
                ProviderConnectionString = sqlConnectionString,
                Metadata = GetConnectionStringMetadata(
                    metadataFiles, project, applicationType, GetMetadataArtifactProcessingDefault())
            };            
            return new ConnectionString(builder);
        }
internal static ConnectionString ConstructConnectionStringObject ( string sqlConnectionString , string providerInvariantName , IEnumerable < string > metadataFiles , Project project , VisualStudioProjectSystem applicationType ) { if ( null == sqlConnectionString ) { throw new ArgumentNullException ( " " ) ; } if ( String . IsNullOrEmpty ( providerInvariantName ) ) { throw new ArgumentNullException ( " " ) ; } if ( project == null ) { throw new ArgumentNullException ( " " ) ; } var builder = new EntityConnectionStringBuilder { Provider = providerInvariantName , ProviderConnectionString = sqlConnectionString , Metadata = GetConnectionStringMetadata ( metadataFiles , project , applicationType , GetMetadataArtifactProcessingDefault ( ) ) } ; return new ConnectionString ( builder ) ; }
Helper to wrap the given sql connection string with a entity client connection string and return it
Helper to wrap the given sql connection string with a entity client connection string and return it
// Wrap the given sql connection string in a map connection string // we don't want to mess with the model when we are in the process of adding it, so just feed in the default value for metadata artifact processing
map connection string containing the sql connection string
map connection string containing the sql connection string
sqlConnectionString
string
sql connection string
sql connection string
providerInvariantName
string
metadataFiles
IEnumerable<string>
project
Project
applicationType
VisualStudioProjectSystem