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))); }
public void VarCharMaxNullReturnsExpectedInstance() { Assert.That(TSql.VarCharMax(null), Is.EqualTo(new TSqlVarCharNullValue(TSqlVarCharSize.Max))); }
public void VarCharMaxReturnsExpectedInstance() { Assert.That(TSql.VarCharMax("value"), Is.EqualTo(new TSqlVarCharValue("value", TSqlVarCharSize.Max))); }