Пример #1
0
        public ActionResult UpdateBusiness(int id, Business businessUpdateDto)
        {
            var businessModel = _repository.GetBusinessById(id);

            if (businessModel == null)
            {
                return(NotFound());
            }

            Business.CopyValues(businessUpdateDto, businessModel);

            _repository.UpdateBusiness(businessModel);
            _repository.SaveChanges();

            return(NoContent());
        }