src/Shared/EntityFramework/Core/Common/Utils/CommandHelper.cs
// <summary>
// requires: commandText must not be null
// The command text must be in the form Container.FunctionImportName.
// </summary>
commandText must not be null
The command text must be in the form Container.FunctionImportName.
commandText must not be null The command text must be in the form Container . FunctionImportName .
internal static void ParseFunctionImportCommandText(
            string commandText, string defaultContainerName, out string containerName, out string functionImportName)
        {
            DebugCheck.NotNull(commandText);
            var nameParts = commandText.Split('.');
            containerName = null;
            functionImportName = null;
            if (2 == nameParts.Length)
            {
                containerName = nameParts[0].Trim();
                functionImportName = nameParts[1].Trim();
            }
            else if (1 == nameParts.Length
                     && null != defaultContainerName)
            {
                containerName = defaultContainerName;
                functionImportName = nameParts[0].Trim();
            }
            if (string.IsNullOrEmpty(containerName)
                || string.IsNullOrEmpty(functionImportName))
            {
                throw new InvalidOperationException(Strings.EntityClient_InvalidStoredProcedureCommandText);
            }
        }
internal static void ParseFunctionImportCommandText ( string commandText , string defaultContainerName , out string containerName , out string functionImportName ) { DebugCheck . NotNull ( commandText ) ; var nameParts = commandText . Split ( ' ' ) ; containerName = null ; functionImportName = null ; if ( 2 == nameParts . Length ) { containerName = nameParts [ 0 ] . Trim ( ) ; functionImportName = nameParts [ 1 ] . Trim ( ) ; } else if ( 1 == nameParts . Length && null != defaultContainerName ) { containerName = defaultContainerName ; functionImportName = nameParts [ 0 ] . Trim ( ) ; } if ( string . IsNullOrEmpty ( containerName ) || string . IsNullOrEmpty ( functionImportName ) ) { throw new InvalidOperationException ( Strings . EntityClient_InvalidStoredProcedureCommandText ) ; } }
requires: commandText must not be null
The command text must be in the form Container.FunctionImportName.
requires : commandText must not be null The command text must be in the form Container . FunctionImportName .
// Split the string
commandText
string
defaultContainerName
string
string
out