Example #1
0
        public async Task <IActionResult> PutInteraction(int id, Interaction interaction)
        {
            if (id != interaction.InteractionId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Example #2
0
        public async Task <IActionResult> PutVaultOrder(int id, VaultOrder vaultOrder)
        {
            if (id != vaultOrder.VaultOrderId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Example #3
0
        public async Task <IActionResult> PutEmployee(int id, Employee employee)
        {
            if (id != employee.EmployeeId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Example #4
0
        public async Task <IActionResult> PutFuneralHomeContact(int id, FuneralHomeContact funeralHomeContact)
        {
            if (id != funeralHomeContact.FuneralHomeContactId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Example #5
0
        public async Task <IActionResult> PutPlant(int id, Plant plant)
        {
            if (id != plant.PlantId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutCemetary(int id, Cemetary cemetary)
        {
            if (id != cemetary.CemetaryId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutDeceased(int id, Deceased deceased)
        {
            if (id != deceased.DeceasedId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutParentFuneralHome(int id, ParentFuneralHome parentFuneralHome)
        {
            if (id != parentFuneralHome.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutTruck(string id, Truck truck)
        {
            if (id != truck.TruckId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }