I am using the Entity/Framework and with SQL & LINQ to create a new application. I have run into a dilemma and after much searching around on the internet I haven’t been able to find the “best practice” that I am looking for. Here is the situation.
Most of the EF examples keep it pretty simple.
1) Put a grid on your form
2) Bind the grid to a basic linq query
3) Allow the user to edit the data right in the grid
I am finding that I get into more complex areas of the application I need to add another step to this. Instead of letting the user edit the data right in the grid, I want to have then double click it (or select it in some other method) and open a dialog window to edit the values for the object. That would allow for more validation and a better UI for end users.
I have done this a couple different ways, usually by passing the EF Context object and the object to edit to the dialog. I feel as though I am making it harder than it should be. Does anyone have any good examples of the “best practice” for editing & adding EF objects via dialog windows rather than in the grids themselves?
Thanks in advance..