public async Task <RespContainer <ArticlePriceListInResponse> > Handle(AddArticlePriceListInCommand request, CancellationToken cancellationToken)
        {
            Models.ArticlePriceListIn articlePriceListIn = _articlePriceListInMapper.Map(request.Data);
            Models.ArticlePriceListIn result             = _articlePriceListInRespository.Add(articlePriceListIn);

            int modifiedRecords = await _articlePriceListInRespository.UnitOfWork.SaveChangesAsync();

            _logger.LogInformation(Events.Add, Messages.NumberOfRecordAffected_modifiedRecords, modifiedRecords);
            _logger.LogInformation(Events.Add, Messages.ChangesApplied_id, result?.Id);

            return(RespContainer.Ok(_articlePriceListInMapper.Map(result), "ArticlePriceListIn Created"));
        }
Beispiel #2
0
        public async Task <ArticlePriceListInResponse> AddArticlePriceListInAsync(AddArticlePriceListInRequest request)
        {
            ArticlePriceListIn articlePriceListIn = _articlePriceListInMapper.Map(request);
            ArticlePriceListIn result             = _articlePriceListInRespository.Add(articlePriceListIn);

            int modifiedRecords = await _articlePriceListInRespository.UnitOfWork.SaveChangesAsync();

            _logger.LogInformation(Events.Add, Messages.NumberOfRecordAffected_modifiedRecords, modifiedRecords);
            _logger.LogInformation(Events.Add, Messages.ChangesApplied_id, result?.Id);

            return(_articlePriceListInMapper.Map(result));
        }