pass entity framework model to user control in wpf

471 views Asked by At

I have an usercontrol that contains a text box. when user in main window, press F5(when focus to textbox) , my user control show a window(usercontrol) that contains a gridview. that grid contains an id and field Columns. this user control most execute for diffrence Entity models. how can pass any entity model to the user control as attribute?

1

There are 1 answers

1
Panh On

I think you answered your question within the asked question. Pass the EntityFramework object (or Data Transfer Object if you chose to use one) into the control, modify the data, and as long as the "main" control recognizes that data has changed, you should be good to go. Hope this helped!