TransactionalNodeService.AddNodeTransactionOperation.CreateNodeCommand C# (CSharp) Méthode

CreateNodeCommand() protected méthode

protected CreateNodeCommand ( System.Guid &newNodeId ) : SqlCommand
newNodeId System.Guid
Résultat System.Data.SqlClient.SqlCommand
        protected SqlCommand CreateNodeCommand(out Guid newNodeId)
        {
            SqlCommand createNodeCommand = new SqlCommand();
            createNodeCommand.CommandText = "INSERT INTO dbo.[Nodes] ([NodeUid], [NodeOriginalId], [NodeTypeUid], [DomainUid]) VALUES (@NodeUid, @NodeOriginalId, @NodeTypeUid, @DomainUid)";
            createNodeCommand.Connection = Connection;

            newNodeId = Guid.NewGuid();

            createNodeCommand.Parameters.AddWithValue("@NodeUid", newNodeId);
            createNodeCommand.Parameters.AddWithValue("@NodeOriginalId", OriginalId);
            createNodeCommand.Parameters.AddWithValue("@NodeTypeUid", NodeType.Id);
            createNodeCommand.Parameters.AddWithValue("@DomainUid", DomainId.GetValue());

            return createNodeCommand;
        }
    }