Ejemplo n.º 1
0
        public async Task <bool> Delete <T>(int id) where T : class
        {
            var entity = await _context.Set <T>().FindAsync(id);

            if (entity != null)
            {
                _context.Remove(entity);
                return(true);
            }

            return(false);
        }