コード例 #1
0
        public IActionResult DeletePointOfInterest([FromBody] PointOfInterestDto pointOfInterestDto)
        {
            PointOfInterest pointOfInterest = _mapper.Map <PointOfInterest>(pointOfInterestDto);

            _pointOfInterest.Delete(pointOfInterest.Id);
            return(Ok());
        }
コード例 #2
0
        public async Task DeleteAsync(Guid id)
        {
            var pointOfInterest = await _repository.GetById(id).ConfigureAwait(false);

            if (pointOfInterest != null)
            {
                await _repository.Delete(id).ConfigureAwait(false);
            }
        }
コード例 #3
0
 public void Delete(Guid id)
 {
     _repository.Delete(id);
 }