Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }