Exemple #1
0
        public async Task <IActionResult> PutPaymentSource(int id, paymentsource paymentsource)
        {
            if (id != paymentsource.paymentSourceId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemple #2
0
        public async Task <IActionResult> PutTenancyAlert(int id, tenancyalert tenancyalert)
        {
            if (id != tenancyalert.tenancyAlertId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutPerson(int id, person person)
        {
            if (id != person.personId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemple #4
0
        public async Task <IActionResult> PutNationality(int id, nationality nationality)
        {
            if (id != nationality.nationalityId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutRentAccount(int id, rentaccount rentaccount)
        {
            if (id != rentaccount.rentAccountId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutTitle(int id, title title)
        {
            if (id != title.titleId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutPropertyClass(int id, propertyclass propertyclass)
        {
            if (id != propertyclass.propertyClassId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }