I study WPF in conjunction with a database, using the entity framework . The data output is mastered, but how - theoretically - should the changes made in the DataGrid be saved? Can anyone have an example? All that I found ends with the output of the data or the context of the database is pulled to the form level ( SaveChange ). But I understand that this is not correct. Maybe you just throw in, knowledgeable people, what objects should be implemented?

  • Well, at the press of a button, a command is invoked from the VM, values ​​from the VM are sent to the model, and SaveChanges is called there. - VladD
  • So I have not set any DataGrid property that it does not send information about the context change? ItemsSource = "{Binding Path = table, Mode = TwoWay, UpdateSourceTrigger = PropertyChanged - Roman
  • Well, I see no problems here. And what does "it does not send context change information"? What do you mean by context? And what do you have a table ? - VladD

0