Skip to content

ISettingsRepo

Namespace: Database.Repository.SettingsRepo

Repository interface for accessing and managing topic settings.

public interface ISettingsRepo

Methods

AddTopicSettingAsync(TopicSetting)

Asynchronously adds a new topic setting to the repository.

Task<Int32> AddTopicSettingAsync(TopicSetting topicSetting)

Parameters

topicSetting TopicSetting

The topic setting to add to the repository.

Returns

A task that represents the asynchronous operation. The task result contains the number of entities affected by
the operation.

Exceptions

ArgumentNullException

Thrown when topicSetting is null.

InvalidOperationException

Thrown when the add operation fails.

GetTopicSettingsAsync()

Asynchronously retrieves a list of all topic settings.

Task<List<TopicSetting>> GetTopicSettingsAsync()

Returns

A task that represents the asynchronous operation. The task result contains a list of
TopicSetting objects.

GetTopicSettingsAsync(Int32, SensorType)

Asynchronously retrieves a list of all topic settings for that place and sensor type.

Task<List<TopicSetting>> GetTopicSettingsAsync(int placeId, SensorType sensorType)

Parameters

placeId Int32

Place id

sensorType SensorType

Sensor type

Returns

A task that represents the asynchronous operation. The task result contains a list of
TopicSetting objects.

RemoveTopicSettingAsync(TopicSetting)

Asynchronously removes a topic setting

Task<Int32> RemoveTopicSettingAsync(TopicSetting topicSetting)

Parameters

topicSetting TopicSetting

The topic setting to remove

Returns

A task that represents the asynchronous operation. The task result contains the number of entities affected by
the operation.

Exceptions

ArgumentNullException

Thrown when topicSetting is null.

InvalidOperationException

Thrown when the add operation fails.

UpdateTopicSettingAsync(TopicSetting)

Asynchronously updates a topic setting

Task<Int32> UpdateTopicSettingAsync(TopicSetting topicSetting)

Parameters

topicSetting TopicSetting

The topic setting to update

Returns

A task that represents the asynchronous operation. The task result contains the number of entities affected by
the operation.

Exceptions

ArgumentNullException

Thrown when topicSetting is null.

InvalidOperationException

Thrown when the add operation fails.