RadEntityFrameworkDataSource

2 posts, 0 answers
  1. Harald
    Harald avatar
    48 posts
    Member since:
    Oct 2013

    Posted 06 Sep 2015 Link to this post

    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?

     

  2. Harald
    Harald avatar
    48 posts
    Member since:
    Oct 2013

    Posted 06 Sep 2015 Link to this post

     

     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 :)

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top