Exemplo n.º 1
0
        public PointOfInterest CreatePointOfInterest(PointOfInterest pointOfInterest)
        {
            _logger.Debug("try to create new point of interest");

            var savedPointOfInterest = _pointOfInterestRepository.Add(pointOfInterest);

            _persistenceContext.SaveChanges();

            _logger.Debug("new point of interest created");

            return(savedPointOfInterest);
        }
        public async Task AddAsync(PointOfInterestEntity entity)
        {
            Guard.ArgumentNotNull(entity, nameof(entity));

            await _repository.Add(entity).ConfigureAwait(false);
        }
        public void Post([FromBody] CreatePointOfInterest pof)
        {
            var entity = PointOfInterest.Create(pof.Description, pof.Location, pof.Name);

            _repository.Add(entity);
        }
Exemplo n.º 4
0
 public async Task Create(PointOfInterestDto input)
 {
     var pointOfInterest = _mapper.Map <PointOfInterest>(input);
     await _repository.Add(pointOfInterest);
 }
Exemplo n.º 5
0
 public PointOfInterest Create(PointOfInterest PointOfInterest)
 {
     return(_Repository.Add(PointOfInterest));
 }