Exemplo n.º 1
0
        public void InsertBrochure(AddBrochureViewModel view, Publication publication)
        {
            var BrochureNew = new Brochure();

            BrochureNew.CoverType      = view.CoverType;
            BrochureNew.NumberPages    = view.NumberPages;
            BrochureNew.Publication    = publication;
            BrochureNew.PublishingYear = view.PublishingYear;
            BrochureNew.TomFilling     = view.TomFilling;
            _brochureRepository.Insert(BrochureNew);
            _brochureRepository.Save();
        }
Exemplo n.º 2
0
        public void Post(PostBrochureView brochure)
        {
            var brochureModel = Mapper.Map <PostBrochureView, Brochure>(brochure);

            _brochureRepository.Insert(brochureModel);
        }