示例#1
0
 protected override void SetupAutomapper(AutomapperSetup setup)
 {
     setup
     .With(_input, _entity)
     .With(_entity, _model)
     .WithPagination(_entitiesPagination, _modelsPagination);
 }
示例#2
0
 public void Configuration(IAppBuilder app)
 {
     XmlConfigurator.Configure();
     _log.Info("Application starting...");
     ConfigureAuth(app);
     ConfigureIoC();
     GlobalConfiguration.Configuration.DependencyResolver = DependencyResolver.GetDependencyResolver();
     GlobalConfiguration.Configure(WebApiConfig.Register);
     ConfigureFormatters();
     GlobalConfiguration.Configuration.MessageHandlers.Add(new OptionsHttpMessageHandler());
     AutomapperSetup.Initialize();
     _log.Info("Application has been started.");
 }
        public void Init()
        {
            _unitOfWork           = new Mock <IUnitOfWork>();
            _recipeRepository     = new Mock <IRecipeRepository>();
            _ingredientRepository = new Mock <IIngredientRepsitory>();
            _recipeService        = new RecipeService(
                _unitOfWork.Object,
                _recipeRepository.Object,
                _ingredientRepository.Object
                );

            AutomapperSetup.Config();
        }
示例#4
0
        private void SetupAutomapper(AutoMocker mocker)
        {
            var setup = new AutomapperSetup(mocker);

            SetupAutomapper(setup);
        }
示例#5
0
 protected virtual void SetupAutomapper(AutomapperSetup setup)
 {
 }
示例#6
0
 protected override void OnStartup(StartupEventArgs e)
 {
     base.OnStartup(e);
     AutomapperSetup.AutomapperInitialize();
 }