コード例 #1
0
 public virtual void AddConnectionStringConfiguration()
 {
     _onConfiguringConfigurations.Add(
         new OptionsBuilderConfiguration(
             UseMethodName
             + "("
             + CSharpUtilities.GenerateVerbatimStringLiteral(CustomConfiguration.ConnectionString)
             + ")"));
 }
コード例 #2
0
        public virtual void AddConnectionStringConfiguration()
        {
            var methodName = Model.Scaffolding().UseProviderMethodName;

            if (string.IsNullOrEmpty(methodName))
            {
                throw new InvalidOperationException(RelationalDesignStrings.MissingUseProviderMethodNameAnnotation);
            }

            _onConfiguringConfigurations.Add(
                _configurationFactory.CreateOptionsBuilderConfiguration(
                    methodName
                    + "("
                    + CSharpUtilities.GenerateVerbatimStringLiteral(CustomConfiguration.ConnectionString)
                    + ")"));
        }