Esempio n. 1
0
 public bool CreateSection(Sections section)
 {
     sectionsRepository.Add(section);
     unitOfWork.Commit();
     if (sectionsRepository != null && unitOfWork != null)
     {
         return true;
     }
     return false;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 public bool UpdateSection(Sections section)
 {
     throw new NotImplementedException();
 }
 public SectionCreateViewModel(Sections section)
 {
     Mapper.CreateMap<Sections, SectionCreateViewModel>();
     Mapper.Map(section, this);
 }