public PublishingController(IPublishingLogic publishingLogic) { this.publishingLogic = publishingLogic; this.config = new MapperConfiguration(cfg => { cfg.AddProfile <PublishingAutoMapperProfile>(); }); this.mapper = config.CreateMapper(); }
public BookController(IBookLogic bookLogic, IAuthorLogic authorLogic, ICityLogic cityLogic, IPublishingLogic publishingLogic) { this.books = bookLogic; this.authors = authorLogic; this.cities = cityLogic; this.publishings = publishingLogic; config = new MapperConfiguration(cfg => { cfg.AddProfile <BookAutoMapperProfile>(); }); mapper = config.CreateMapper(); }
public CreateBookViewModel(IAuthorLogic authorLogic, ICityLogic cityLogic, IPublishingLogic publishingLogic) { this.Authors = SetAuthors(authorLogic.GetAll().ToList()); this.Cities = SetCities(cityLogic.GetAll().ToList()); this.Publishings = SetPublishings(publishingLogic.GetAll().ToList()); }