Example #1
0
 public PublishingController(IPublishingLogic publishingLogic)
 {
     this.publishingLogic = publishingLogic;
     this.config          = new MapperConfiguration(cfg => {
         cfg.AddProfile <PublishingAutoMapperProfile>();
     });
     this.mapper = config.CreateMapper();
 }
Example #2
0
        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();
        }
Example #3
0
 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());
 }