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

Support string conversion in LINQ projections #545

Closed
jbogard opened this issue Jun 27, 2014 · 2 comments
Closed

Support string conversion in LINQ projections #545

jbogard opened this issue Jun 27, 2014 · 2 comments
Labels
Milestone

Comments

@jbogard
Copy link
Member

jbogard commented Jun 27, 2014

Support calling ToString automatically in LINQ projections:

public class Source
{
    public int Value { get; set; }
}

public class Dest
{
    public string Value { get; set; }
}

Mapper.CreateMap<Source, Dest>();

var sources = new[]
{
    new Source
    {
        Value = 5
    }
}.AsQueryable();

_dests = sources.Project().To<Dest>().ToArray();

Currently this results in an exception about not finding a type map between Int and String.

@jbogard jbogard added this to the 3.3.0 milestone Jun 27, 2014
@nbarbettini
Copy link

Working great in 3.3.0 - thanks! This was a pain point before with QueryableExtensions.

@lock
Copy link

lock bot commented May 8, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants