L Van

L Van

  • NA
  • 43
  • 19.8k

WPF with SQL data

Nov 2 2011 12:14 PM
I am fairly new to .net and WPF.  I've read a few books and have the basic concepts of WPF.  I want to build a practice application.  So I am building a customer database.  Then I have built a WPF app with a datagrid and a few other controls and buttons.  I would like to know the CORRECT way to load the data from my database(Customers) to my datagrid on load of the window.  I know how to write the SQL commands, I used SQL on another platform so I'm not looking for that.  I am interested in connecting to the database and how I load and bind the data to my datagrid.  I get alot of generic answers but that doesn't help someone who is trying to learn.  I want to know if my SQL should be outside of my WPF app(I've been told to keep the SQL separate).  I think once I get the idea of using SQL in my apps, I will be on my way.  Can anyone help or point me to a good example that actually works so I can learn and understand it?  Thanks!

Answers (1)