/// <summary>
        /// Inserts the integration service URL call parameter.
        /// </summary>
        /// <param name="dto">The dto.</param>
        /// <exception cref="System.ArgumentNullException">dto</exception>
        /// <exception cref="System.Data.DBConcurrencyException"></exception>
        public void InsertIntegrationServiceUrlCallParameter(IntegrationServiceUrlCallParameterDto dto)
        {
            const string CommandText = @"
INSERT INTO [dbo].[IntegrationServiceUrlCallParameters]
(
     [SettingsId]
    ,[LastModifiedOn]
    ,[Guid]
    ,[Name]
    ,[Value]
)
VALUES
(
     @settingsId
    ,GETDATE()
    ,@guid
    ,@name
    ,@value
);

SET @id = SCOPE_IDENTITY();";

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

            using (var cmd = new SqlCommand(CommandText))
            {
                var idParam = cmd.Parameters.Add("@id", SqlDbType.Int);
                idParam.Direction = ParameterDirection.Output;

                cmd.Parameters.AddWithValue("@settingsId", dto.SettingsId);
                cmd.Parameters.AddWithValue("@guid", dto.Guid);
                cmd.Parameters.AddWithValue("@name", dto.Name);
                cmd.Parameters.AddWithValue("@value", dto.Value);

                var rowsAffected = Database.Execute(cmd);

                if (rowsAffected == 0)
                    throw new DBConcurrencyException(ConcurencyException);

                dto.Id = (int)idParam.Value;
            }
        }
        /// <summary>
        /// Updates the integration service URL call parameter.
        /// </summary>
        /// <param name="dto">The dto.</param>
        /// <exception cref="System.ArgumentNullException">dto</exception>
        /// <exception cref="System.Data.DBConcurrencyException"></exception>
        public void UpdateIntegrationServiceUrlCallParameter(IntegrationServiceUrlCallParameterDto dto)
        {
            const string CommandText = @"
UPDATE [dbo].[IntegrationServiceUrlCallParameters]
SET
     [SettingsId] = @settingsId
    ,[LastModifiedOn] = GETDATE()
    ,[Guid] = @guid
    ,[Name] = @name
    ,[Value] = @value
WHERE [Id] = @id;";

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

            using (var cmd = new SqlCommand(CommandText))
            {
                cmd.Parameters.AddWithValue("@id", dto.Id);
                cmd.Parameters.AddWithValue("@settingsId", dto.SettingsId);
                cmd.Parameters.AddWithValue("@guid", dto.Guid);
                cmd.Parameters.AddWithValue("@name", dto.Name);
                cmd.Parameters.AddWithValue("@value", dto.Value);

                var rowsAffected = Database.Execute(cmd);

                if (rowsAffected == 0)
                    throw new DBConcurrencyException(ConcurencyException);
            }
        }
        /// <summary>
        /// Reads the service URL parameters.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <returns>IEnumerable{IntegrationServiceUrlCallParameterDto}.</returns>
        private static IEnumerable<IntegrationServiceUrlCallParameterDto> ReadServiceUrlParameters(IDataReader reader)
        {
            reader.NextResult();

            var result = new List<IntegrationServiceUrlCallParameterDto>();

            while (reader.Read())
            {
                var dto = new IntegrationServiceUrlCallParameterDto
                              {
                                  Id = reader.GetInt32(0),
                                  Guid = reader.GetGuid(1),
                                  Name = reader.GetString(2),
                                  Value = reader.GetString(3)
                              };

                result.Add(dto);
            }

            return result;
        }