I have a simple winforms application that I am connecting to my database with linq-to-sql.
I have generated the classes directly from the database, and I have a DataAccess class that wraps my datacontext and can give me whatever I need.
I have a view that uses an object datasource to populate a DataGridView and a set of related text fields, etc.. for my entity (lets call it EmployeeView)
The view loads all of the existing rows, and as I click through the grid, the fields update appropriately.
If I change fields, the changes will persist through record changes, but I am not sure how to save changes through my data access layer. How can I detect which records are dirty and need to be saved? How do I then save them? What is the best way to add new records? Delete records?
I can find a lot of resources online, but none with the kind of examples I need. Can anyone help me out with some of the basic patterns, or point me to a good place?