Class
RadEntityFrameworkCoreDataSource

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:

cs-api-definition
[TelerikToolboxCategory("Data")]
public class RadEntityFrameworkCoreDataSource : Control

Inheritance: objectRadEntityFrameworkCoreDataSource

Constructors

RadEntityFrameworkCoreDataSource()

Initializes a new instance of the RadEntityFrameworkCoreDataSource class.

Declaration

cs-api-definition
public RadEntityFrameworkCoreDataSource()

Fields

DbContextProperty

Identifies DbContext dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DbContextProperty

Field Value

DependencyProperty

QueryNameProperty

Identifies QueryName dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty QueryNameProperty

Field Value

DependencyProperty

Properties

DataView

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

Declaration

cs-api-definition
public DataItemCollection DataView { get; }

Property Value

DataItemCollection

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

DbContext

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

Declaration

cs-api-definition
public DbContext DbContext { get; set; }

Property Value

DbContext

The context.

FilterDescriptors

Gets the filter descriptors used for filtering operations.

Declaration

cs-api-definition
public CompositeFilterDescriptorCollection FilterDescriptors { get; }

Property Value

CompositeFilterDescriptorCollection

The filter descriptors.

GroupDescriptors

Gets the group descriptors used for grouping operations.

Declaration

cs-api-definition
public GroupDescriptorCollection GroupDescriptors { get; }

Property Value

GroupDescriptorCollection

The group descriptors.

LoadCommand

Gets the command for loading data.

Declaration

cs-api-definition
public ICommand LoadCommand { get; }

Property Value

ICommand

The command for loading data.

QueryName

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

Declaration

cs-api-definition
public string QueryName { get; set; }

Property Value

string

The name of the query to use for loading data.

RelatedObjects

The names of the related entities.

Declaration

cs-api-definition
public Collection<string> RelatedObjects { get; }

Property Value

Collection<string>

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.

SortDescriptors

Gets the sort descriptors used for sorting operations.

Declaration

cs-api-definition
public SortDescriptorCollection SortDescriptors { get; }

Property Value

SortDescriptorCollection

The sort descriptors.

SubmitChangesCommand

Gets the command for submitting changes.

Declaration

cs-api-definition
public ICommand SubmitChangesCommand { get; }

Property Value

ICommand

The command for submitting changes.

Methods

CreateView()

Creates the view.

Declaration

cs-api-definition
protected virtual QueryableCollectionView CreateView()

Returns

QueryableCollectionView

The view.

Load()

Initiates a Load operation if possible.

Declaration

cs-api-definition
public void Load()

SubmitChanges()

Initiates a Submit operation if possible.

Declaration

cs-api-definition
public void SubmitChanges()