Beispiel #1
0
        public static void Initialize(IKernel kernel)
        {
            //Services
            var config = new MapperConfiguration(cfg =>
            {
                WebMapperConfig.Initialize(cfg);
            });

            kernel.Bind <IMapper>().ToConstructor(c => new Mapper(config)).InSingletonScope();

            CoreKernel.Initialize(kernel);
        }
Beispiel #2
0
 public SaleController(ISaleService saleService)
 {
     _mapper      = new Mapper(WebMapperConfig.Configure());
     _saleService = saleService;
 }