Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. conn.Open();
  2. using (var command = new SqlCommand("SELECT * FROM tblRecipe", conn))
  3. {
  4. var reader = command.ExecuteReader();
  5. while (reader.Read())
  6. {
  7. TwojaTabelkaDTO newPrzepis = new TwojaTabelkaDTO()
  8. {
  9. RecipeID = reader.GetInt32(0),
  10. Ingredients = reader.GetString(1),
  11. Notes = reader.GetString(2)
  12. };
  13. (newPrzepis);
  14.  
  15. }
  16. }
  17. conn.Close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement