public static IEnumerable <object> Project(ItemPurchased purchased, Guid nextEventId, int checkpointPosition)
        {
            yield return(TSql.NonQueryStatement(@"insert into ItemsPurchased (StockKeepingUnit) values (@StockKeepingUnit)", new
            {
                StockKeepingUnit = TSql.VarCharMax(purchased.StockKeepingUnit)
            }));

            yield return(TSql.NonQueryStatement(@"insert into StreamCheckpoint (Position) values (@Position)", new
            {
                Position = TSql.Int(checkpointPosition)
            }));

            yield return(new WriteToStream(nextEventId, "egress", new CheckpointEvent(checkpointPosition)));
        }
Esempio n. 2
0
 public void VarCharMaxNullReturnsExpectedInstance()
 {
     Assert.That(TSql.VarCharMax(null), Is.EqualTo(new TSqlVarCharNullValue(TSqlVarCharSize.Max)));
 }
Esempio n. 3
0
 public void VarCharMaxReturnsExpectedInstance()
 {
     Assert.That(TSql.VarCharMax("value"), Is.EqualTo(new TSqlVarCharValue("value", TSqlVarCharSize.Max)));
 }