Hello Hristo
Thanks for having take the time to look into my problem.
I am afraid that I have not explained clearly the problem I am trying to solve:
1. I have no problement creating an EF connected to my database
2. I have no problem creating a SQL View on a table of my database and integrating this view into my EF
3. I have no problem binding either a table or the view to a datagrid.
The problem comes when I want to manage and store a change made to a cell of the grid.
If the grid is bound to a table, using in the cellvaluechanged event and context.savechanges works perfectly
But when the grid is bound to a view, the same context.savechanges generates an error indicating that the operation is not allowed on this entity (I conclude that the view is kind of readonly in the EF).
I have thought of two ways to avoid the error:
1. Discard the pending changes in the EF, but this seems rather complex
2. Use a different mecanism that the cellvalue changed event to avoid the change to be "stored" by the EF and store the change in the database through a specific function. But I have not found how to do this.
I hope I have been more comprehensible
Thanks a lot
Pierre-Jean