You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
682 B
30 lines
682 B
using System.Collections.Immutable;
|
|
using System.Data;
|
|
|
|
namespace Connected.Entities.Storage;
|
|
|
|
public class StorageOperation : IStorageOperation
|
|
{
|
|
private List<IStorageParameter> _parameters;
|
|
|
|
public StorageOperation()
|
|
{
|
|
_parameters = new();
|
|
}
|
|
|
|
public string CommandText { get; init; }
|
|
|
|
public CommandType CommandType { get; init; } = CommandType.Text;
|
|
|
|
public ImmutableList<IStorageParameter>? Parameters => _parameters.ToImmutableList();
|
|
|
|
public int CommandTimeout { get; init; } = 30;
|
|
|
|
public DataConcurrencyMode Concurrency { get; init; } = DataConcurrencyMode.Enabled;
|
|
|
|
public void AddParameter(IStorageParameter parameter)
|
|
{
|
|
_parameters.Add(parameter);
|
|
}
|
|
}
|