public bool CreateSection(Sections section) { sectionsRepository.Add(section); unitOfWork.Commit(); if (sectionsRepository != null && unitOfWork != null) { return true; } return false; }
public bool CreateMapping(object viewModel) { var sect = new Sections(); Mapper.CreateMap<SectionCreateViewModel, Sections>(); Mapper.Map((SectionCreateViewModel)viewModel, sect); sectionsRepository.Add(sect); unitOfWork.Commit(); if (sectionsRepository != null && unitOfWork != null) { return true; } return false; }
public bool UpdateSection(Sections section) { throw new NotImplementedException(); }
public SectionCreateViewModel(Sections section) { Mapper.CreateMap<Sections, SectionCreateViewModel>(); Mapper.Map(section, this); }