Skip to content

Instantly share code, notes, and snippets.

@ssougnez ssougnez/wp-dapper-05.cs
Last active Jun 8, 2018

Embed
What would you like to do?
string sql = $@"INSERT INTO [Drivers] ([FirstName], [LastName], [ChampionTitleCount]) VALUES (@FirstName, @LastName, @ChampionTitleCount);
SELECT CAST(SCOPE_IDENTITY() AS int);";
await connection.ExecuteAsync(sql, new
{
FirstName = "Sebastian",
LastName = "Vettel",
ChampionTitleCount = 4
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.