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