解决方案 »

  1.   

    我试过在SheetFoodPrice里传递实体也是一样的错误
      

  2.   

    D里的IDAL.ITSheetPriceDetail和IDAL.ITSheetPriceMaster的定义是一样的
    我现在就是不知道哪里不行,按道理IDAL.ITSheetPriceMaster是从IDALBaseTable<Entity.TSheetPriceMaster>过来的,Entity.TSheetPriceMaster是有EntityBase过来的,为什么IDAL.ITSheetPriceMaster会不符合IDALBaseTable<Entity.EntityBase>约束,不能做隐式转换?
      

  3.   

    很明显你定义的IDALBaseSheet<M,D>,M,D必须是IDALBaseTable<Entity.EntityBase>,而你传入的是ITSheetPriceMaster和ITSheetPriceDetail,1个是IDALBase<T>类型,一个是EntityBase类型,明显无法相互转换。
      

  4.   

    IDALBase<IEntity>和IEntity明显不是一个概念吧
      

  5.   

    ITSheetPriceMaster是IDALBaseTable<Entity.TSheetPriceMaster>继承而来
    Entity.TSheetPriceMaster是EntityBase继承而来
    不知道是你看错了,还是我没看懂你的话
      

  6.   

    这里不存在IDALBase<IEntity>到IEntity的转换ITSheetPriceMaster --> IDALBaseTable<Entity.TSheetPriceMaster> -->  IDALBaseTable<Entity.EntityBase>
      

  7.   

    http://bbs.csdn.net/topics/390011621
    据说class1<type1>和class1<bypebase>是不同的类,不能做隐式转换
      

  8.   

    IDALBaseSheet<M,D> 你改成IDALBaseSheet<out M, out D>试试?如果不行改成IDALBaseSheet<in M, in D>如果还不行的话看下逆变量和协变量或许对你有帮助
      

  9.   


    接上, 里面的接口都给它加全部out关键字或者in 关键字, 倾向于out关键字
      

  10.   

    好像.net4才有这东东,我用的是3.5,不过据说用in和out也不行,具体我没有试过
      

  11.   

    确实是4.0才有 但是用in out还是尝试下 4.0有不大  装一个赛