void ISectionService.Insert(SectionDTO newSection) { DAL.Models.Section section = this.mapper.Map <DAL.Models.Section>(newSection); this.unitOfWork.Sections.Insert(section); this.unitOfWork.Save(); }
void ISectionService.Update(SectionDTO sectionToUpdate) { DAL.Models.Section section = this.mapper.Map <DAL.Models.Section>(sectionToUpdate); this.unitOfWork.Sections.Update(section); this.unitOfWork.Save(); }
SectionDTO ISectionService.GetById(int id) { DAL.Models.Section section = this.unitOfWork.Sections.GetById(id); return(this.mapper.Map <SectionDTO>(section)); }