예제 #1
0
 public bool Delete(ConstructionDTO entityDto)
 {
     return(ConstructionRepository.Build().Delete(ConstructionMapper.Build().ToEntity(entityDto)));
 }
예제 #2
0
 public ConstructionDTO GetWithChildren(int id)
 {
     return(ConstructionMapper.Build().ToDtoWithChildren(ConstructionRepository.Build().GetWithChildren(id)));
 }
예제 #3
0
 public bool UpdateWithChildren(ConstructionDTO entityDto)
 {
     return(ConstructionRepository.Build().UpdateWithChildren(ConstructionMapper.Build().ToEntityWithChildren(entityDto)));
 }
예제 #4
0
        //public bool CreateOrUpdate(ConstructionDTO entityDto)
        //{
        //    return entityDto.Id > 0 ? Update(entityDto) : Create(entityDto);
        //}

        public List <ConstructionDTO> GetAll()
        {
            return(ConstructionMapper.Build().ToDtoList(ConstructionRepository.Build().GetAll()).ToList());
        }
예제 #5
0
 public int Create(ConstructionDTO entityDto)
 {
     return(ConstructionRepository.Build().Create(ConstructionMapper.Build().ToEntity(entityDto)));
 }