Guest User

Untitled

a guest
Jul 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. IEnumerable<Product> produto;
  2. var name = "chef";
  3. var likeTrick = $"%{name}%";
  4. using (var connection = new SqlConnection(configuration.GetConnectionString("DefaultConnection")))
  5. {
  6. produto = connection.Query<Product>(@"SELECT * FROM Products WHERE ProductName LIKE @productName", new { productName = likeTrick });
  7. }
Add Comment
Please, Sign In to add comment