Esempio n. 1
0
        public async Task <IActionResult> PutProcedureIdQualifier([FromRoute] int id, [FromBody] ProcedureIdQualifier procedureIdQualifier)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != procedureIdQualifier.ProcedureIdQualifierId)
            {
                return(BadRequest());
            }

            _context.Entry(procedureIdQualifier).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ProcedureIdQualifierExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutDeductibleOutOfPocket([FromRoute] int id, [FromBody] DeductibleOutOfPocket deductibleOutOfPocket)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != deductibleOutOfPocket.DeductibleId)
            {
                return(BadRequest());
            }

            _context.Entry(deductibleOutOfPocket).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!DeductibleOutOfPocketExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutSmokingStatus([FromRoute] short id, [FromBody] SmokingStatus smokingStatus)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != smokingStatus.SmokingStatusId)
            {
                return(BadRequest());
            }

            _context.Entry(smokingStatus).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!SmokingStatusExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Esempio n. 4
0
        public async Task <IActionResult> PutBenefit([FromRoute] int id, [FromBody] Benefit benefit)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != benefit.BenefitId)
            {
                return(BadRequest());
            }

            _context.Entry(benefit).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!BenefitExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutRestrictionType([FromRoute] short id, [FromBody] RestrictionType restrictionType)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != restrictionType.RestrictionTypeId)
            {
                return(BadRequest());
            }

            _context.Entry(restrictionType).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!RestrictionTypeExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutCoveragePolicy([FromRoute] int id, [FromBody] CoveragePolicy coveragePolicy)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != coveragePolicy.CoveragePolicyId)
            {
                return(BadRequest());
            }

            _context.Entry(coveragePolicy).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CoveragePolicyExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutAuthorizationRequired([FromRoute] short id, [FromBody] AuthorizationRequired authorizationRequired)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != authorizationRequired.AuthorizationRequiredId)
            {
                return(BadRequest());
            }

            _context.Entry(authorizationRequired).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!AuthorizationRequiredExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutMetalLevel([FromRoute] short id, [FromBody] MetalLevel metalLevel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != metalLevel.MetalLevelId)
            {
                return(BadRequest());
            }

            _context.Entry(metalLevel).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!MetalLevelExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutMonetaryAmountObject([FromRoute] int id, [FromBody] MonetaryAmountObject monetaryAmountObject)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != monetaryAmountObject.MonetaryamountId)
            {
                return(BadRequest());
            }

            _context.Entry(monetaryAmountObject).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!MonetaryAmountObjectExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Esempio n. 10
0
        public async Task <IActionResult> PutHealthInfo([FromRoute] short id, [FromBody] HealthInfo healthInfo)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != healthInfo.HealthInfoId)
            {
                return(BadRequest());
            }

            _context.Entry(healthInfo).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!HealthInfoExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutServiceTypeCodes([FromRoute] string id, [FromBody] ServiceTypeCodes serviceTypeCodes)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != serviceTypeCodes.CodeX12Spec)
            {
                return(BadRequest());
            }

            _context.Entry(serviceTypeCodes).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ServiceTypeCodesExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }