diff --git a/examples/src/DapperExample/Program.cs b/examples/src/DapperExample/Program.cs index df94e8ea..d563e5e9 100644 --- a/examples/src/DapperExample/Program.cs +++ b/examples/src/DapperExample/Program.cs @@ -15,10 +15,10 @@ PRIMARY KEY (Id) ); """); -await connection.ExecuteAsync("INSERT INTO Users(Id, Name, Email) VALUES ($Id, $Name, $Email)", +await connection.ExecuteAsync("INSERT INTO Users(Id, Name, Email) VALUES (@Id, @Name, @Email)", new User { Id = 1, Name = "Name", Email = "Email" }); -Console.WriteLine(await connection.QuerySingleAsync("SELECT * FROM Users WHERE Id = $Id", +Console.WriteLine(await connection.QuerySingleAsync("SELECT * FROM Users WHERE Id = @Id", new { Id = 1 })); await connection.ExecuteAsync("DROP TABLE Users");