mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add code to delete sound synthesizers.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user