Esempio n. 1
0
        public void UpdatePerson(Domain.Model.Person inputPerson)
        {
            _logger.LogInformation($"Updating person with ID {inputPerson.Id}");
            Context.Person currentEntity = _dbContext.People.Find(inputPerson.Id);
            Context.Person newEntity     = Mapper.UnMapPerson(inputPerson);

            _dbContext.Entry(currentEntity).CurrentValues.SetValues(newEntity);
        }
        public void UpdateReview(Domain.Model.Review inputReview)
        {
            _logger.LogInformation($"Updating review with ID {inputReview.Id}");
            Context.Review currentEntity = _dbContext.Reviews.Find(inputReview.Id);
            Context.Review newEntity     = Mapper.UnMapReview(inputReview);

            _dbContext.Entry(currentEntity).CurrentValues.SetValues(newEntity);
        }
        public void UpdateStore(Domain.Model.Store inputStore)
        {
            _logger.LogInformation($"Updating store with ID {inputStore.Id}");
            Context.Store currentEntity = _dbContext.Stores.Find(inputStore.Id);
            Context.Store newEntity     = Mapper.UnMapStore(inputStore);

            _dbContext.Entry(currentEntity).CurrentValues.SetValues(newEntity);
        }
        public void UpdateSeller(Domain.Model.Seller inputSeller)
        {
            _logger.LogInformation($"Updating seller with ID {inputSeller.Id}");
            Context.Seller currentEntity = _dbContext.Sellers.Find(inputSeller.Id);
            Context.Seller newEntity     = Mapper.UnMapSeller(inputSeller);

            _dbContext.Entry(currentEntity).CurrentValues.SetValues(newEntity);
        }
Esempio n. 5
0
        public void UpdateItem(Domain.Model.Item inputItem)
        {
            _logger.LogInformation($"Updating item with ID {inputItem.Id}");
            Context.Item currentEntity = _dbContext.Items.Find(inputItem.Id);
            Context.Item newEntity     = Mapper.UnMapItem(inputItem);

            _dbContext.Entry(currentEntity).CurrentValues.SetValues(newEntity);
        }