Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToDataSourceResult does not enable a function to bind to a VM #13

Open
OoonaNet opened this issue Nov 28, 2014 · 2 comments
Open

ToDataSourceResult does not enable a function to bind to a VM #13

OoonaNet opened this issue Nov 28, 2014 · 2 comments

Comments

@OoonaNet
Copy link

General

The Kendo.Mvc.Extensions ToDataSourceResult has an overload that enables a function to be called in order to bind the result to VM/DTO this overload is missing in Kendo.DynamicLinq where only 3 overloads exist.

Attempts to work around

I tried to use the Kendo.Mvc.Extensions but the filters and sorts don't match up.
Using the Kendo.Mvc.Extensions made a huge improvement in performance as the DTO conversion was made after the data was filtered and sorted.

It will be great to have it.
10x

@holwerda
Copy link

holwerda commented Jun 9, 2016

Just wondering if this has been looked at or addressed. I keep seeing examples of this mapping functionality, but do not see it in the release.

@bdongus
Copy link

bdongus commented Dec 18, 2016

Ran into this just recently. My work around using AutoMapper:
DataSourceResult retVal = result.ToDataSourceResult(request);
retVal.Data = retVal.Data.OfType<RawData>().Select((raw) => _mapper.Map<ViewModel>(raw)ToList();
return retVal;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants