This is a migrated thread and some comments may be shown as answers.

RadEntityFrameworkDataSource

1 Answer 115 Views
EntityFrameworkDataSource
This is a migrated thread and some comments may be shown as answers.
Harald
Top achievements
Rank 2
Harald asked on 06 Sep 2015, 03:05 PM

In the XAML-File the DataSorce created. Data displayed in in a DataGridView and DataForm.

<telerik:RadEntityFrameworkDataSource Name="ProductsEntityFrameworkDataSource" QueryName="Products">
<telerik:RadEntityFrameworkDataSource.DbContext>
<local:AdventureWorksEntities />
</telerik:RadEntityFrameworkDataSource.DbContext>
</telerik:RadEntityFrameworkDataSource>

How can I save the changes?

 

1 Answer, 1 is accepted

Sort by
0
Harald
Top achievements
Rank 2
answered on 06 Sep 2015, 03:47 PM

 

 I solved the problem.

        <telerik:RadEntityFrameworkDataSource Name="ProductsEntityFrameworkDataSource" QueryName="Products">
            <telerik:RadEntityFrameworkDataSource.DbContext>
                <local:AdventureWorksEntities x:Name="ProductsDbContext" />
            </telerik:RadEntityFrameworkDataSource.DbContext>
        </telerik:RadEntityFrameworkDataSource>

In the c# Code:

private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            this.ProductsDbContext.SaveChanges();
        }

It´s works :)

Tags
EntityFrameworkDataSource
Asked by
Harald
Top achievements
Rank 2
Answers by
Harald
Top achievements
Rank 2
Share this question
or