/// <summary>
        /// Deletes the integration service method index reference.
        /// </summary>
        /// <param name="dto">
        /// The data transfer object.
        /// </param>
        public void DeleteIntegrationServiceMethodIndexReference(IntegrationServiceMethodIndexReferenceDto dto)
        {
            const string CommandText = @"
DELETE FROM [dbo].[IntegrationServiceMethodIndexReferences]
WHERE [MethodId] = @methodId AND [IndexId] = @indexId;";

            if (dto == null)
                throw new ArgumentNullException("dto");

            using (var ctx = GetConnectionManager())
            {
                using (var cmd = new SqlCommand(CommandText, ctx.Connection))
                {
                    cmd.Parameters.AddWithValue("@methodId", dto.MethodId);
                    cmd.Parameters.AddWithValue("@indexId", dto.IndexId);

                    var rowsAffected = cmd.ExecuteNonQuery();
                    if (rowsAffected == 0)
                        throw new DBConcurrencyException(ConcurencyException);
                }
            }
        }
        /// <summary>
        /// Inserts an integration service method index reference.
        /// </summary>
        /// <param name="dto">
        /// The data transfer object.
        /// </param>
        public void InsertIntegrationServiceMethodIndexReference(IntegrationServiceMethodIndexReferenceDto dto)
        {
            const string CommandText = @"
INSERT INTO [dbo].[IntegrationServiceMethodIndexReferences]
(
     [MethodId]
    ,[IndexId]
)
VALUES
(
     @methodId
    ,@indexId
);";

            if (dto == null)
                throw new ArgumentNullException("dto");

            using (var ctx = GetConnectionManager())
            {
                using (var cmd = new SqlCommand(CommandText, ctx.Connection))
                {
                    cmd.Parameters.AddWithValue("@methodId", dto.MethodId);
                    cmd.Parameters.AddWithValue("@indexId", dto.IndexId);

                    cmd.ExecuteNonQuery();
                }
            }
        }