Add code to delete sound synthesizers.

This commit is contained in:
2020-05-24 22:03:48 +01:00
parent 21f1857b53
commit 08204a1f89
5 changed files with 93 additions and 124 deletions

View File

@@ -33,5 +33,17 @@ namespace Marechai.Services
Frequency = s.Frequency, Depth = s.Depth, SquareWave = s.SquareWave,
WhiteNoise = s.WhiteNoise, Type = s.Type
}).ToListAsync();
public async Task DeleteAsync(int id)
{
SoundSynth item = await _context.SoundSynths.FindAsync(id);
if(item is null)
return;
_context.SoundSynths.Remove(item);
await _context.SaveChangesAsync();
}
}
}