public async Task <IActionResult> DeleteCase(int id)
        {
            var caseObject = await context.Cases.FindAsync(id);

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

            context.Remove(caseObject);
            await context.SaveChangesAsync();

            return(Ok(id));
        }
Beispiel #2
0
        public async Task <IActionResult> DeleteStorage(int id)
        {
            var storage = await context.Storages.FindAsync(id);

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

            context.Remove(storage);
            await context.SaveChangesAsync();

            return(Ok(id));
        }
Beispiel #3
0
        public async Task <IActionResult> DeleteCoolingFan(int id)
        {
            var coolingFan = await context.CoolingFans.FindAsync(id);

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

            context.Remove(coolingFan);
            await context.SaveChangesAsync();

            return(Ok(id));
        }
Beispiel #4
0
        public async Task <IActionResult> DeleteCpu(int id)
        {
            var cpu = await context.CPUs.FindAsync(id);

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

            context.Remove(cpu);
            await context.SaveChangesAsync();

            return(Ok(id));
        }
        public async Task <IActionResult> DeleteSaleItem(int id)
        {
            var saleItem = await context.SaleItems.FindAsync(id);

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

            context.Remove(saleItem);
            await context.SaveChangesAsync();

            return(Ok(id));
        }
Beispiel #6
0
        public async Task <IActionResult> DeleteMotherboard(int id)
        {
            var motherboard = await context.Motherboards.FindAsync(id);

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

            context.Remove(motherboard);
            await context.SaveChangesAsync();

            return(Ok(id));
        }
Beispiel #7
0
        public async Task <IActionResult> DeleteOrder(int id)
        {
            var order = await context.Orders.FindAsync(id);

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

            context.Remove(order);
            await context.SaveChangesAsync();

            return(Ok(id));
        }
        public async Task <IActionResult> DeleteRam(int id)
        {
            var ram = await context.RAMs.FindAsync(id);

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

            context.Remove(ram);
            await context.SaveChangesAsync();

            return(Ok(id));
        }
Beispiel #9
0
        public async Task <IActionResult> DeleteAccountInfo(int id)
        {
            var account = await context.Accounts.FindAsync(id);

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

            context.Remove(account);
            await context.SaveChangesAsync();

            return(Ok(id));
        }
Beispiel #10
0
        public async Task <IActionResult> DeletePowersupply(int id)
        {
            var powerSupply = await context.PowerSupplys.FindAsync(id);

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

            context.Remove(powerSupply);
            await context.SaveChangesAsync();

            return(Ok(id));
        }