fix(sms): S2 review — add DeleteSmsConfigurationAsync + schema/repo tests + doc nit

This commit is contained in:
Joseph Doherty
2026-06-19 10:06:44 -04:00
parent b46691747c
commit 3827b98484
6 changed files with 47 additions and 2 deletions
@@ -104,6 +104,13 @@ public class NotificationRepository : INotificationRepository
public Task UpdateSmsConfigurationAsync(SmsConfiguration smsConfiguration, CancellationToken cancellationToken = default)
{ _context.Set<SmsConfiguration>().Update(smsConfiguration); return Task.CompletedTask; }
/// <inheritdoc />
public async Task DeleteSmsConfigurationAsync(int id, CancellationToken cancellationToken = default)
{
var entity = await _context.Set<SmsConfiguration>().FindAsync(new object[] { id }, cancellationToken);
if (entity != null) _context.Set<SmsConfiguration>().Remove(entity);
}
/// <inheritdoc />
public async Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)
=> await _context.SaveChangesAsync(cancellationToken);