由网友(♚ 大果冻C)分享简介:有对结构图和温莎配置的例子:的http://www.cprieto.com/index.php/2009/08/20/using-automapper-with-castle-windsor/不过,我还没有发现任何东西Ninject。你知道如何将这些映射转换为Ninject?解决方案 公共类AutoMapperM...
有对结构图和温莎配置的例子: 的http://www.cprieto.com/index.php/2009/08/20/using-automapper-with-castle-windsor/
不过,我还没有发现任何东西Ninject。
你知道如何将这些映射转换为Ninject?
解决方案 公共类AutoMapperModule:NinjectModule
{
公众覆盖无效负载()
{
绑定< IMappingEngine>()ToMethod(CTX => Mapper.Engine);
}
}
There are configuration examples for Structure Map and Windsor: http://www.cprieto.com/index.php/2009/08/20/using-automapper-with-castle-windsor/
But I haven't found anything for Ninject.
Do you know how to translate those mappings to Ninject?
解决方案public class AutoMapperModule : NinjectModule
{
public override void Load()
{
Bind<IMappingEngine>().ToMethod(ctx => Mapper.Engine);
}
}
相关推荐
最新文章