First the advice, I am creating an winForms application that allows the users to update some of the domain tables in the application. I do this by displaying a read only collection of all the items in a datagridview. On this form the user can click an edit or add button which will display the appropriate edit window with that object. My question is once the user makes the changes to the object in the edit window I need to reflect these changes in the datagridview. I know I could simply refresh the list by pulling all the information into the database, but this seems like overkill since some of the tables will contain thousands of records and I can't see updating the list with that many records for changes in one record.
My question is should the readonly collection know how to add/update records based on its editable coutner part? Or should the UI be responsible for updating/adding the new record to the list?
Next question involves code generation with partial classes. How are you handling compisition in your code generated classes? How are you handling ValidationRules that don't depend on the database constraints?
Thanks in advance.
Copyright (c) Marimer LLC