TransactionalNodeService.AddRelationshipTransactionOperation.CreateRelationship C# (CSharp) Method

CreateRelationship() protected method

protected CreateRelationship ( System.Guid &newRelationshipUid ) : SqlCommand
newRelationshipUid System.Guid
return System.Data.SqlClient.SqlCommand
        protected SqlCommand CreateRelationship(out Guid newRelationshipUid)
        {
            SqlCommand createRelationshipCommand = new SqlCommand();
            createRelationshipCommand.CommandText = "INSERT INTO dbo.[Relationships] (RelationshipUid, RelationshipOriginalId, RelationshipTypeUid, DomainUid) VALUES (@RelationshipUid, @RelationshipOriginalId, @RelationshipTypeUid, @DomainUid)";
            createRelationshipCommand.Connection = Connection;

            newRelationshipUid = Guid.NewGuid();

            createRelationshipCommand.Parameters.AddWithValue("@RelationshipUid", newRelationshipUid);
            createRelationshipCommand.Parameters.AddWithValue("@RelationshipOriginalId", OriginalId);
            createRelationshipCommand.Parameters.AddWithValue("@RelationshipTypeUid", RelationshipType.Id);
            createRelationshipCommand.Parameters.AddWithValue("@DomainUid", DomainId.GetValue());

            return createRelationshipCommand;
        }