I am trying to create an object that looks something like this:
public class MyObject
{
private IList<AnotherObject> items;
public List<AnotherObject> Items
{
return items.AsEnumerable().ToList<AnotherObject>();
}
}
I use NHibernate as my DAL and bind it directly to the items field, and all this works fine.
I also use Windows Workflow, and replicator activity does not work with generic IList. ( http://social.msdn.microsoft.com/Forums/en-US/windowsworkflowfoundation/thread/2ca74b60-fd33-4031-be4b-17a79e9afe63 ) This basically forces me to use the List <> wrapper instead of IList <>. This, of course, violates the direct mapping of NHibernate, since the NHibernate IList implementation cannot be directly passed to the list.
** : Windows , , , IList.
/ . , -- NHibernate nhibernate, .
, XML. XML , - nhibernate. . AsEnumerable.ToList .Add.
- ? ?
** EDIT: NHibernate NHibernate.Collection.Generic.PersistentGenericBag, IList . , . , , , .