Comments (4)
Grab this branch if you want a solution file and a local clone of DataTables.Queryable so you can debug it on the fly.
from datatables.queryable.
Hmm... I'm using DataTables.Queryable with AutoMapper too, but never faced with the same issue. May be it's because of Microsoft.EntityFrameworkCore.Query
. Need time to verify.
from datatables.queryable.
from datatables.queryable.
@AlexanderKrutov here you go:
https://github.com/VictorioBerra/DataTables.Queryable.ProjectTo.Issue.29
The code that breaks is here: https://github.com/VictorioBerra/DataTables.Queryable.ProjectTo.Issue.29/blob/master/Program.cs#L90
To get started run these, it will automatically drop the SQLIte DB and migrate and seed on every run.
git clone https://github.com/VictorioBerra/DataTables.Queryable.ProjectTo.Issue.29.git
cd DataTables-ProjectTo-issue-29/
dotnet run
Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1[EFCore.Models.CatViewModel]' to type 'System.Linq.IQueryable`1[EFCore.Models.Cat]'.
at DataTables.Queryable.DataTablesQueryProvider`1.CreateQuery(Expression expression)
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
at AutoMapper.QueryableExtensions.ProjectionExpression.To[TResult](Object parameters, Expression`1[] membersToExpand) in C:\projects\automapper\src\AutoMapper\QueryableExtensions\ProjectionExpression.cs:line 62
at AutoMapper.QueryableExtensions.Extensions.ProjectTo[TDestination](IQueryable source, IConfigurationProvider configuration, Expression`1[] membersToExpand) in C:\projects\automapper\src\AutoMapper\QueryableExtensions\Extensions.cs:line 76
at EFCore.Program.Main(String[] args) in C:\Users\me\Desktop\DataTables.Queryable.ProjectTo.Issue.29\Program.cs:line 90
at EFCore.Program.<Main>(String[] args)
from datatables.queryable.
Related Issues (20)
- In the sample, if I type "Mar" it finds start dates but "March" does not. Why is this? HOT 1
- Better error handling when the request tries to reflect to the desired type.
- Ordering on a complex type does not work. HOT 3
- .net core 2.0 JsonDataTable ? HOT 3
- Using the library with in-memory objects HOT 5
- Support passing up CancellationTokens to ToPagedListAsync(). HOT 4
- ToNameValueCollection() throws when a column is provided but a search is not. HOT 2
- Multi column ordering does not work? HOT 2
- NullReferenceException inside GetPropertyByName HOT 2
- Support for Multiple Filter Values on Same Column HOT 2
- NullReferenceException inside BuildStringContainsPredicate HOT 6
- I really need to know what name/data failed when calling GetPropertyByName. HOT 1
- I think `name` should try to be parsed BEFORE `data`. Here is why: HOT 3
- Add custom Data Fields to DataTablesAjaxPostModel HOT 2
- How to add (Edit &Delete) buttons in datatable? HOT 1
- Can we use/call SQL store procedure? HOT 1
- How to use with Razor Pages HOT 2
- ToPagedListAsync Call is ambiguous HOT 1
- Allow ToPagedListAsync to take cancellation token
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datatables.queryable.