public async Task <bool> DeleteMessageInAsync(int Id) { var sms = await _context.MessageIns.Where(x => x.Id == Id).FirstAsync(); if (sms != null) { _context.Remove(sms); await _context.SaveChangesAsync(); return(true); } return(false); }
public async Task <bool> DeleteAuditLogAsync(int Id) { var category = await _context.AuditLogs.Where(x => x.Id == Id).FirstAsync(); if (category != null) { _context.Remove(category); await _context.SaveChangesAsync(); return(true); } return(false); }