protected override void SetupAutomapper(AutomapperSetup setup) { setup .With(_input, _entity) .With(_entity, _model) .WithPagination(_entitiesPagination, _modelsPagination); }
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(); }
private void SetupAutomapper(AutoMocker mocker) { var setup = new AutomapperSetup(mocker); SetupAutomapper(setup); }
protected virtual void SetupAutomapper(AutomapperSetup setup) { }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); AutomapperSetup.AutomapperInitialize(); }