コード例 #1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var objectToDelete = await _engines.GetEngineById(id, true);

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

            _engines.Archive(objectToDelete);
            await _engines.SaveChangesAsync();

            return(RedirectToAction(nameof(Index)));
        }