Ncqrs.Eventing.Storage.SQL.MsSqlServerEventStore.GetVersion C# (CSharp) Method

GetVersion() private static method

Gets the version of the provider from the event store.
private static GetVersion ( System.Guid providerId, SqlTransaction transaction ) : int?
providerId System.Guid The provider id.
transaction System.Data.SqlClient.SqlTransaction The transaction.
return int?
        private static int? GetVersion(Guid providerId, SqlTransaction transaction)
        {
            using (var command = new SqlCommand(SelectVersionQuery, transaction.Connection))
            {
                command.Transaction = transaction;
                command.Parameters.AddWithValue("id", providerId);
                return (int?)command.ExecuteScalar();
            }
        }