Giter VIP home page Giter VIP logo

Comments (4)

jslatts avatar jslatts commented on June 23, 2024

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.

rajeev-shenoy avatar rajeev-shenoy commented on June 23, 2024

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.

jbogard avatar jbogard commented on June 23, 2024

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.

rajeev-shenoy avatar rajeev-shenoy commented on June 23, 2024

Ok, I will get the latest package.

Thanks.

from automapper.ef6.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.