Пример #1
0
        public async Task <IActionResult> Delete(int id)
        {
            var asset = await _dbContext.Assets.FindAsync(id);

            _dbContext.Remove(asset);
            await _dbContext.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }