Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
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:

C#
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.
Posted
Updated 9-Dec-15 8:43am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900