QueryableEntityCollectionView vs ICollectionView vs RadEntityFrameworkCoreDataSource

1 Answer 50 Views
EntityFrameworkCoreDataSource (.Net Core)
Sami
Top achievements
Rank 2
Iron
Iron
Iron
Sami asked on 17 Nov 2022, 11:35 PM

Hi:

I'm confused about the best approach to create a crud with Telerik and EntityFramewok 7.0. In some of your samples, I found the use of ICollectionView, but in others QueryableEntityCollectionView and in the mvm sample of RadEntityFrameworkCoreDataSource documentation I was expecting RadEntityFrameworkCoreDataSource, but instead, it uses QueryableEntityCollectionView. Could you help me to understand the differences and advantages of each approach?

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 18 Nov 2022, 03:42 PM

Hello Sami,

By ICollectionView I will guess you mean the QueryableCollectionView class. This is just our implementation of the ICollectionView interface. It is used mostly to support grouping, sorting and filtering in our components (like RadGridView), but we provide it also as a stand-alone control so the developers can use it, instead of implementing the interface.

The QueryableEntityCollectionView and QueryableEntityCoreCollectionView are mostly the same implementation. The first class was created for .NET Framework (like 4.0 and 4.5) and the second one is for .NET Core 3.1 and later (5, 6 and 7). These classes are very similar to QueryableCollectionView, but they are specialized in working with Db entities and EntityFramework versions.

The MVVM help article of RadEntityFrameworkCoreDataSource shows the QueryableEntityCoreCollectionView, because this is the underlying collection view used by RadEntityFrameworkCoreDataSource to handle the data. You can use the data source class in the situations where you need better control over the data or if you want to hold information about it in the view model.

If you need to use Telerik + EntityFramework 7.0 I would suggest you to use RadEntityFrameworkCoreDataSource or directly the QueryableEntityCoreCollectionView. Which one to use is up to your preferences.

I hope this information helps.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Sami
Top achievements
Rank 2
Iron
Iron
Iron
commented on 22 Nov 2022, 02:38 PM

Thanks for your support. Do you have something similar in blazor components?
Martin Ivanov
Telerik team
commented on 23 Nov 2022, 07:48 AM

Can you post this question in the UI for Blazor Forum?
Tags
EntityFrameworkCoreDataSource (.Net Core)
Asked by
Sami
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or