Created
April 26, 2014 15:42
-
-
Save ToJans/11323282 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var specification = | |
TSql.Projection(). | |
When<PortfolioAdded>(@event => | |
TSql.NonQuery( | |
"INSERT INTO [Portfolio] (Id, Name) VALUES ({0}, {1})", | |
TSql.Int(@event.Id), TSql.NVarChar(@event.Name, 40) | |
). | |
When<PortfolioRemoved>(@event => | |
TSql.NonQuery( | |
"DELETE FROM [Portfolio] WHERE Id = {0}", | |
TSql.Int(@event.Id) | |
). | |
When<PortfolioRenamed>(@event => | |
TSql.NonQuery( | |
"UPDATE [Portfolio] SET Name = {0} WHERE Id = {1}", | |
TSql.Int(@event.Id), TSql.NVarChar(@event.Name, 40) | |
). | |
Build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or, you could use
@0
,@1
etc as well...