public IEnumerable <LaboratoryViewModel> ToListViewModel(IEnumerable <Laboratory> Laboratorys) { var config = new MapConfig().ToViewModel(); var mapper = config.CreateMapper(); return(mapper.Map <IEnumerable <Laboratory>, IEnumerable <LaboratoryViewModel> >(Laboratorys)); }
public IEnumerable <UserViewModel> ToListViewModel(IEnumerable <User> Users) { var config = new MapConfig().ToViewModel(); var mapper = config.CreateMapper(); return(mapper.Map <IEnumerable <User>, IEnumerable <UserViewModel> >(Users)); }
public IEnumerable <ProductViewModel> ToListViewModel(IEnumerable <Product> Products) { var config = new MapConfig().ToViewModel(); var mapper = config.CreateMapper(); return(mapper.Map <IEnumerable <Product>, IEnumerable <ProductViewModel> >(Products)); }
public QualityResultViewModel ToViewModel(QualityResult QualityResult) { var config = new MapConfig().ToViewModel(); var mapper = config.CreateMapper(); return(mapper.Map <QualityResultViewModel>(QualityResult)); }
public ProductViewModel ToViewModel(Product Product) { var config = new MapConfig().ToViewModel(); var mapper = config.CreateMapper(); return(mapper.Map <ProductViewModel>(Product)); }
public IEnumerable <QualityResultViewModel> ToListViewModel(IEnumerable <QualityResult> QualityResults) { var config = new MapConfig().ToViewModel(); var mapper = config.CreateMapper(); return(mapper.Map <IEnumerable <QualityResult>, IEnumerable <QualityResultViewModel> >(QualityResults)); }
public UserViewModel ToViewModel(User User) { var config = new MapConfig().ToViewModel(); var mapper = config.CreateMapper(); return(mapper.Map <UserViewModel>(User)); }
public LotViewModel ToViewModel(Lot lot) { var config = new MapConfig().ToViewModel(); var mapper = config.CreateMapper(); return(mapper.Map <LotViewModel>(lot)); }
public IEnumerable <AnalysisViewModel> ToListViewModel(IEnumerable <Analysis> Analysiss) { var config = new MapConfig().ToViewModel(); var mapper = config.CreateMapper(); return(mapper.Map <IEnumerable <Analysis>, IEnumerable <AnalysisViewModel> >(Analysiss)); }
public LaboratoryViewModel ToViewModel(Laboratory Laboratory) { var config = new MapConfig().ToViewModel(); var mapper = config.CreateMapper(); return(mapper.Map <LaboratoryViewModel>(Laboratory)); }
public AnalysisViewModel ToViewModel(Analysis Analysis) { var config = new MapConfig().ToViewModel(); var mapper = config.CreateMapper(); return(mapper.Map <AnalysisViewModel>(Analysis)); }
protected virtual S SnapshotMap(T s) { //return AutoMapper.Mapper.Map<T, S>(s); var mapper = MapConfig.CreateMapper(); return(mapper.Map <T, S>(s)); }
} //utilizado apenas na view #endregion public Product ToDomain() { var config = new MapConfig().ToDomain(); var mapper = config.CreateMapper(); Product Product = mapper.Map <Product>(this); return(Product); }
public Laboratory ToDomain() { var config = new MapConfig().ToDomain(); var mapper = config.CreateMapper(); Laboratory Laboratory = mapper.Map <Laboratory>(this); return(Laboratory); }
public Analysis ToDomain() { var config = new MapConfig().ToDomain(); var mapper = config.CreateMapper(); Analysis Analysis = mapper.Map <Analysis>(this); return(Analysis); }
public User ToDomain() { var config = new MapConfig().ToDomain(); var mapper = config.CreateMapper(); User User = mapper.Map <User>(this); return(User); }
public QualityResult ToDomain() { var config = new MapConfig().ToDomain(); var mapper = config.CreateMapper(); QualityResult QualityResult = mapper.Map <QualityResult>(this); return(QualityResult); }
public Lot ToDomain() { var config = new MapConfig().ToDomain(); var mapper = config.CreateMapper(); Lot Lot = mapper.Map <Lot>(this); return(Lot); }
private void ConfigureContainer() { _kernel.Bind(x => x .FromAssemblyContaining <ProjectService>() .SelectAllClasses() .InheritedFrom(typeof(IDomainService)) .BindDefaultInterface()); _kernel.Bind(x => x .FromThisAssembly() .IncludingNonePublicTypes() .SelectAllClasses() .InheritedFrom(typeof(IConsumer)) .BindToSelf()); var busControl = Bus.Factory.CreateUsingRabbitMq(x => { var host = x.Host(GetHostAddress(), h => { h.Username(ConfigurationManager.AppSettings["RabbitMQUsername"]); h.Password(ConfigurationManager.AppSettings["RabbitMQPassword"]); }); x.ReceiveEndpoint(host, "commands", e => { e.LoadFrom(_kernel); }); }); _kernel.Bind <IBusControl>() .ToConstant(busControl) .InSingletonScope(); _kernel.Bind <IBus>() .ToProvider(new CallbackProvider <IBus>(x => x.Kernel.Get <IBusControl>())); var bus = _kernel.Get <IBusControl>(); _kernel.Bind <IStoreEvents>() .ToMethod(context => EventStoreConfig.Create(bus)) .InSingletonScope(); _kernel.Bind <IMapper>().ToConstant(MapConfig.CreateMapper()).InSingletonScope(); _kernel.Bind <IDetectConflicts>().To <ConflictDetector>(); _kernel.Bind <IRepository>().To <EventStoreRepository>(); _kernel.Bind <IConstructAggregates>().To <AggregateFactory>(); }