//之前有MySQL和Oracle都实现了IHelper的接口,现在新增了一个redis的接口, //但是和之前不匹配,需要新增一个适配器类转换 public static void Show() { IHelper mysql = new MySqlHelper(); mysql.Add <User>(); IHelper oracle = new OracleHelper(); oracle.Add <User>(); IHelper redis = new Adapter(new RedisHelper()); redis.Add <User>(); }