src/Misc/EFTools/EntityDesign/VisualStudio/ModelWizard/engine/ModelBuilderSettings.cs
// <summary>
//     This will set up the design-time &amp; runtime invariant name properties &amp; connection string properties.
// </summary>
// <param name="isDesignTime">Indicates if invariant name &amp; connection strings are design-time or runtime.</param>
This will set up the design-time & runtime invariant name properties & connection string properties.
This will set up the design - time & runtime invariant name properties & connection string properties .
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1614:ElementParameterDocumentationMustHaveText")]
        internal void SetInvariantNamesAndConnectionStrings(IServiceProvider serviceProvider,
            Project project, string invariantName, string connectionString, string appConfigConnectionString, bool isDesignTime)
        {
            if (isDesignTime)
            {
                _designTimeConnectionString = connectionString;
                _appConfigConnectionString = ConnectionManager.TranslateConnectionString(
                    serviceProvider, project, invariantName, appConfigConnectionString, true);
                _designTimeProviderInvariantName = invariantName;
                _runtimeProviderInvariantName = ConnectionManager.TranslateInvariantName(
                    serviceProvider, _designTimeProviderInvariantName, _designTimeConnectionString, true);
            }
            else
            {
                _designTimeConnectionString = ConnectionManager.TranslateConnectionString(
                    serviceProvider, project, invariantName, connectionString, false);
                _appConfigConnectionString = appConfigConnectionString;
                _runtimeProviderInvariantName = invariantName;
                _designTimeProviderInvariantName = ConnectionManager.TranslateInvariantName(
                    serviceProvider, _runtimeProviderInvariantName, _designTimeConnectionString, false);
            }
        }
[ SuppressMessage ( " " , " " ) ] internal void SetInvariantNamesAndConnectionStrings ( IServiceProvider serviceProvider , Project project , string invariantName , string connectionString , string appConfigConnectionString , bool isDesignTime ) { if ( isDesignTime ) { _designTimeConnectionString = connectionString ; _appConfigConnectionString = ConnectionManager . TranslateConnectionString ( serviceProvider , project , invariantName , appConfigConnectionString , true ) ; _designTimeProviderInvariantName = invariantName ; _runtimeProviderInvariantName = ConnectionManager . TranslateInvariantName ( serviceProvider , _designTimeProviderInvariantName , _designTimeConnectionString , true ) ; } else { _designTimeConnectionString = ConnectionManager . TranslateConnectionString ( serviceProvider , project , invariantName , connectionString , false ) ; _appConfigConnectionString = appConfigConnectionString ; _runtimeProviderInvariantName = invariantName ; _designTimeProviderInvariantName = ConnectionManager . TranslateInvariantName ( serviceProvider , _runtimeProviderInvariantName , _designTimeConnectionString , false ) ; } }
This will set up the design-time & runtime invariant name properties & connection string properties.
This will set up the design - time & runtime invariant name properties & connection string properties .
serviceProvider
IServiceProvider
project
Project
invariantName
string
connectionString
string
appConfigConnectionString
string
isDesignTime
bool
Indicates if invariant name & connection strings are design-time or runtime.
Indicates if invariant name & connection strings are design - time or runtime .