public async Task <String> PutConditionApplicationService(int id, Condition condition)
        {
            var respuestaDomainService = _conditionDomainService.PutConditionDomainService(id, condition);

            bool hayErrorEnElDomainService = respuestaDomainService != null;

            if (hayErrorEnElDomainService)
            {
                return(respuestaDomainService);
            }

            _baseDatos.Entry(condition).State = EntityState.Modified;
            await _baseDatos.SaveChangesAsync();

            return(null);
        }
        public async Task <String> PutBrandApplicationService(int id, Brand brand)
        {
            var respuestaDomainService = _brandDomainService.PutBrandDomainService(id, brand);

            bool hayErrorEnElDomainService = respuestaDomainService != null;

            if (hayErrorEnElDomainService)
            {
                return(respuestaDomainService);
            }

            _baseDatos.Entry(brand).State = EntityState.Modified;
            await _baseDatos.SaveChangesAsync();

            return(null);
        }
Esempio n. 3
0
        public async Task <String> PutPhotoApplicationService(int id, Photo photo)
        {
            var respuestaDomainService = _photoDomainService.PutPhotoDomainService(id, photo);

            bool hayErrorEnElDomainService = respuestaDomainService != null;

            if (hayErrorEnElDomainService)
            {
                return(respuestaDomainService);
            }

            _baseDatos.Entry(photo).State = EntityState.Modified;
            await _baseDatos.SaveChangesAsync();

            return(null);
        }
        public async Task <String> PutSellerApplicationService(int id, Seller seller)
        {
            var respuestaDomainService = _sellerDomainService.PutSellerDomainService(id, seller);

            bool hayErrorEnElDomainService = respuestaDomainService != null;

            if (hayErrorEnElDomainService)
            {
                return(respuestaDomainService);
            }

            _baseDatos.Entry(seller).State = EntityState.Modified;
            await _baseDatos.SaveChangesAsync();

            return(null);
        }
        public async Task <String> PutModelApplicationService(int id, Model model)
        {
            Purchase purchase = await DBCall(model);

            var responseDomainService = _modelDomainService.PutModelDomainService(id, purchase);

            bool errorInTheDomainService = responseDomainService != null;

            if (errorInTheDomainService)
            {
                return(responseDomainService);
            }

            _dataBase.Entry(model).State = EntityState.Modified;
            await _dataBase.SaveChangesAsync();

            return(null);
        }
Esempio n. 6
0
        public async Task <String> PutCarApplicationService(int id, Car car)
        {
            Purchase purchase = await DBCall(car);

            var responseDomainService = _carDomainService.PutCarDomainService(id, purchase);

            bool anErrorOnTheDomainService = responseDomainService != null;

            if (anErrorOnTheDomainService)
            {
                return(responseDomainService);
            }

            _dataBase.Entry(car).State = EntityState.Modified;
            await _dataBase.SaveChangesAsync();

            return(null);
        }