private bool DoUpdate(Guid aggregateId, int currentVersion, int newVersion)
{
if (currentVersion == 0)
{
this.connection.Insert(new AggregateManifest { Identity = aggregateId, Version = newVersion, });
}
else
{
var rows = this.connection.Execute(UpdateSql, newVersion, aggregateId, currentVersion);
return rows == 1;
}
return true;
}