GithubHelp home page GithubHelp logo

automapperassist's People

Contributors

darrencauthon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

automapperassist's Issues

What's the purpose of public DefineMap empty method?

I was looking at this interesting project, and while wondering where to hook my custom mappings, I saw this public (and not virtual) DefineMap overload, which is mystery for me. What it is for?

If I want to add few "custom" mappings on top of the by-default ones, or to change some of them, where is the most appropriate place to do that? In the DefineMap override(configuration)?

Cheers,

CreateSet to reuse CreateInstance

Currently, both CreateSet and CreateInstance use mappingEngine.Map

I needed to intercept and log particular data when some mapping fails - i.e. some identifying property of the source. To get this, I had to override both methods.

If CreateSet in the select statement uses CreateInstance instead of engine.Map, the user would need to override only create instance.

The above applies if some custom stuff needs to happen for each element as well.

Please, let me know what you thing about this, and I'll create a pull request - it's just a 1 line change.

Cheers

Nuget problems

Current version of AutoMapperAssist on Nuget requires AutoMapper >=v2.0 - but fails to run with AutoMapper v3.0 (the current version).
Also, AutoMapperAssist can no longer be installed with the new version of Nuget (that ships with VS2012.4 RC2) - installation fails with:
Install failed. Rolling back...
Authors is required.

inject child mappers

Thanks for your response on #2.

Now I'm fighting with something else. Let's say I created a mapper for a child object(s). And I'd like to inject it into a new mapper for a parent object. Looks like I can not find an easy way for this. I mean something like

public class ChildDtoToChildMapper : Mapper
{
public override DefineMap(...){..do mapping for child }
}

public class ParentDtoToParent
{
private readonly Mapper childMapper;
public ParentDtoToParent(Mapper childMapper)
{ this.childMapper = mapper; }

publci override void DefineMap(....)
{
//...create map for the parrent
// ??? how to use the injected mapper for ParentDto.ChildDto ???
}
}

Any pointers?

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.