Beispiel #1
0
        public async Task <DetectionPoint> AddDetectionPointAsync(InsertDetectionPointDto input)
        {
            var district = await _districtService.GetByExpression(p => p.Code.Equals(input.DistrictCode));

            if (district == null)
            {
                throw new MyAppException
                      {
                          ErrorCode = MyCustomErrorCodes.DISTRICT_NOT_FOUND
                      };
            }

            return(await _pointService.CreateAsync(input, district));
        }