Add code to delete processors.

This commit is contained in:
2020-05-24 21:55:23 +01:00
parent f6f80465c8
commit 5322b1d7f1
5 changed files with 93 additions and 214 deletions

View File

@@ -41,5 +41,17 @@ namespace Marechai.Services
InstructionSetExtensions =
p.Processor.InstructionSetExtensions.Select(e => e.Extension.Extension).ToList()
}).ToListAsync();
public async Task DeleteAsync(int id)
{
Processor item = await _context.Processors.FindAsync(id);
if(item is null)
return;
_context.Processors.Remove(item);
await _context.SaveChangesAsync();
}
}
}