c# - How to get objectcontext from a control datasource -


i'm new in c# , entity framework. there way objectcontext control datasource ?

i have 3 project , 2 entity framework , last 1 window form application. winform have 2 datagridview each 1 each ef project.

the issue when want savechanges datagridview a, have call myef_a.savechanges() , when want save datagridview b, have call myef_b.savechanges().

is there solution, can call savechanges() method base on form.activecontrol (datagridview or datagridview b) tracing control.datasource objectcontext?

i'm afraid not. problem datasource of type "object". though cast original type, never use objectcontext binding object, collection.

i may wrong though, please correct me if that's case here.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -