c# - Update DataGrid to EF -


i display data datagrid in way:

var display = (from r in ve.folders.include("hosting_company1")                select new repoclass{ id = r.folder_id,name= r.full_name, hosname= r.hosting_company1.housing_name }).tolist();  dg1.itemssource = display; 

and in xaml:

<datagrid canuseraddrows="false" autogeneratecolumns="false" name="dg1">     <datagrid.columns>         <datagridtextcolumn binding="{binding path=id, mode=twoway}" header="id"/>         <datagridtextcolumn binding="{binding path=name, mode=twoway}" header="name" />         <datagridtextcolumn binding="{binding path=hosname, mode= twoway}"  header="company" />     </datagrid.columns> </datagrid> 

how update data ef?

if ve datacontext, need call ve.savechanges(). pass observable collection datagrid changes easier manage.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -