New to Telerik UI for WPFStart a free 30-day trial

Provides an object for loading, paging, filtering, sorting, and editing entities coming from EntityFrameworkCore's DbContext.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.EntityFrameworkCore.dll

Syntax:

C#
[TelerikToolboxCategory("Data")]
public class RadEntityFrameworkCoreDataSource : Control

Inheritance: objectRadEntityFrameworkCoreDataSource

Constructors

Initializes a new instance of the RadEntityFrameworkCoreDataSource class.

C#
public RadEntityFrameworkCoreDataSource()

Fields

DbContextProperty

DependencyProperty

Identifies DbContext dependency property.

C#
public static readonly DependencyProperty DbContextProperty

QueryNameProperty

DependencyProperty

Identifies QueryName dependency property.

C#
public static readonly DependencyProperty QueryNameProperty

Properties

Gets the current view of entities resulting from the last load operation, using a DataItemCollection.

C#
public DataItemCollection DataView { get; }
Property Value:

The current view of entities resulting from the last load operation.

DbContext

DbContext

Gets or sets the DbContext instance used for executing the load and submit operations.

C#
public DbContext DbContext { get; set; }
Property Value:

The context.

Gets the filter descriptors used for filtering operations.

C#
public CompositeFilterDescriptorCollection FilterDescriptors { get; }
Property Value:

The filter descriptors.

Gets the group descriptors used for grouping operations.

C#
public GroupDescriptorCollection GroupDescriptors { get; }
Property Value:

The group descriptors.

Gets the command for loading data.

C#
public ICommand LoadCommand { get; }
Property Value:

The command for loading data.

Gets or sets the name of the query to use for loading.

C#
public string QueryName { get; set; }
Property Value:

The name of the query to use for loading data.

The names of the related entities.

C#
public Collection<string> RelatedObjects { get; }
Property Value:

The names of the related entities.

Remarks:

For example, if your main entity set is called "Orders", you might want to add "OrderDetails" to this collection in case you want to get the related OrderDetails for each Order from the database.

Gets the sort descriptors used for sorting operations.

C#
public SortDescriptorCollection SortDescriptors { get; }
Property Value:

The sort descriptors.

Gets the command for submitting changes.

C#
public ICommand SubmitChangesCommand { get; }
Property Value:

The command for submitting changes.

Methods

Creates the view.

C#
protected virtual QueryableCollectionView CreateView()
Returns:

QueryableCollectionView

The view.

Initiates a Load operation if possible.

C#
public void Load()

Initiates a Submit operation if possible.

C#
public void SubmitChanges()