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(); }
public void Post(PostBrochureView brochure) { var brochureModel = Mapper.Map <PostBrochureView, Brochure>(brochure); _brochureRepository.Insert(brochureModel); }