示例#1
0
        public void Remove(MasterRegionDTO masterRegionDTO)
        {
            MasterRegion masterRegion = _mapper.Map <MasterRegion>(masterRegionDTO);

            _unitOfWork.MasterRegions.Remove(masterRegion);
            _unitOfWork.Complete();
        }
        public async Task <ActionResult> DeleteMasterRegion(MasterRegionViewModelID masterRegionViewModelID)
        {
            try
            {
                MasterRegionDTO masterRegionDTO = _mapper.Map <MasterRegionDTO>(masterRegionViewModelID);

                _masterRegionService.Remove(masterRegionDTO);
                return(Ok());
            }
            catch
            {
                return(StatusCode(500));
            }
        }