Mr Developer

Mr Developer

  • NA
  • 1
  • 791

show data in WPF entity framework

Dec 9 2015 2:33 PM
I am working in WPF in VS2013 with linkage of database created in SQL Server 2014. I am writing simple functions like add, create, delete and update records. All function runs fine, but I want that all my records should be shown in a GridView in WPF..

I searched a lot but could not find any answer.. I wrote this code for adding records:

MyNew_DBEntities db = new MyNew_DBEntities();

Student st = new Student();
st.First_Name = First_Name.Text;
st.Last_Name = Last_Name.Text;
st.Department = Department.Text;

db.Students.Add(st);
db.SaveChanges();


and I want that after this addition all my record entered should be shown in GridView and so on. Similarity for deletion and update of records too.

Answers (1)