Unable to cast object of type NHibernate.Collection.Generic.PersistentGenericBag to List

后端 未结 2 1700
暗喜
暗喜 2020-12-01 04:18

I have a class called ReportRequest as:

public class ReportRequest
{
    Int32 templateId;
    List entityIds;

    public virtual Int32? Id
            


        
2条回答
  •  再見小時候
    2020-12-01 04:50

    Use collection interfaces instead of concrete collections, so NHibernate can inject it with its own collection implementation.

    In this case, use IList instead of List

提交回复
热议问题