Quantcast
Viewing all articles
Browse latest Browse all 18858

mvvm & ef & model changes

Hi,

I have a masterdetail program. The datagrid is bound to the Rows property which is an observable collection and the detail is bound to the CurrentRow property which is a class from the entity framework.

First i was using ef4 with Code Generation Strategy Legacy ObjectContext. And i addes partial classes which implemented IDataErrorInfo. Now i made a new project with the same mvvm and with ef6.

My problems are that i can't change the Code Generation Strategy from T4 to something else (because it's disabled) and i can't create new partial classes with the name of the entity because ef already generated them. This made me think that maybe i am doing something wrong. 

My questions are: 

Where do i have to put validation?

How do i notify the viewmodel of changes in the model (For example when the value of a column in CurrentRow changes how can i respond to that in the view model).

I am searching for days now so i hope someone can help me with this.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>