Example #1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            if (orm == 1)
            {
                qdb.rmproducttype(id);
            }
            else
            {
                ProductTypes pt = await _db.ProductTypes.FindAsync(id);

                _db.ProductTypes.Remove(pt);
                await _db.SaveChangesAsync();
            }

            TempData["delete"] = 1;
            return(RedirectToAction(nameof(Index)));
        }