Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IEnumerable<Product> produto;
- var name = "chef";
- var likeTrick = $"%{name}%";
- using (var connection = new SqlConnection(configuration.GetConnectionString("DefaultConnection")))
- {
- produto = connection.Query<Product>(@"SELECT * FROM Products WHERE ProductName LIKE @productName", new { productName = likeTrick });
- }
Add Comment
Please, Sign In to add comment