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.
Connected.Framework/Connected.Entities/Storage/StorageOperation.cs

30 lines
682 B

2 years ago
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);
}
}