Comments (4)
If you grab https://github.com/AutoMapper/AutoMapper.EF6/blob/master/src/AutoMapper.EF6/EntityFrameworkExtensions.cs and add it directly to your project, it works fine. I think it is just the Nuget package config that is broken, but I'm afraid I don't understand enough about Nuget (specifically testing dev packages) to generate a PR with a fix.
Anyway, it looks like it could be this line of the project.json:
https://github.com/AutoMapper/AutoMapper.EF6/blob/master/src/AutoMapper.EF6/project.json#L17
from automapper.ef6.
The problem with ProjectToSingle is caused by this line:
https://github.com/AutoMapper/AutoMapper.EF6/blob/master/src/AutoMapper.EF6/EntityFrameworkExtensions.cs#L60
The QueryableExtensions in Automapper 4.1.1 no longer contain a method ProjectTo with the following signature:
queryable.ProjectTo<TDestination>().Decompile().Single();
Looking at the source for QueryableExtensions in Automapper 4.1.1, it looks like this will need to be changed to:
queryable.ProjectTo<TDestination>(null, Mapper.Engine).Decompile().Single();
I have modified my code to use the above method from QueryableExtensions rather than the ProjectToSingle from the EntityFrameworkExtensions.
However, you will need to fix the EntityFrameworkExtensions methods to work with Automapper 4.1.1 for it to be of any use.
from automapper.ef6.
I pushed out a new version. That broke because of 4.0 using optional parameters. I don't use optional parameters anymore.
from automapper.ef6.
Ok, I will get the latest package.
Thanks.
from automapper.ef6.
Related Issues (20)
- ProjectTo(): int <-> Color conversion leads into System.ArgumentException HOT 3
- Strongly signed HOT 1
- EntityFramework Version HOT 2
- Package version 1.0.0 on NuGet appears broken HOT 7
- EF Core 2.0 Support HOT 5
- Is is planned to release this with support for EF Core? HOT 1
- DLLs in NuGet packages appear not to be signed HOT 1
- Nuget version depends on incorrect Automapper dll HOT 4
- Can't use IValueConverter HOT 1
- Support NETCOREAPP3.1 or NETSTANDARD2.1 HOT 3
- [Question] Can I use AutoMapper.EF to map Dtos to entities (including nested included relations)? HOT 1
- how to use? HOT 2
- Nuget package targets outdated HOT 3
- Add Ctor for GenerateEntityFrameworkPrimaryKeyPropertyMaps that takes in an instance of the DBContent HOT 1
- State of 2.1.0 HOT 3
- error in Linq handling for ProjectTo method HOT 1
- Default value on "...OrDefault" operations HOT 1
- Possibility to update System.Data.SqlClient to version >=4.8.5? HOT 1
- ProjectTo<T> should support excluding [NotMapped] or explicitly provided entity properties
- Pass MapperConfigurationExpression? HOT 4
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 automapper.ef6.