I believe this is a bug, but I'm new to CSLA 2.1 so I thought I'd post it to be safe.
In the DataPortal_Fetch private method the ResourceList turns off readonly (line 45), adds a ResourceInfo object, but then turns off readonly again (line 51) but should probably turn it back on.
So instead of this:
IsReadOnly = false;
while (dr.Read())
{
ResourceInfo info = new ResourceInfo(dr);
this.Add(info);
}
IsReadOnly = false;
There should be this:
IsReadOnly = false;
while (dr.Read())
{
ResourceInfo info = new ResourceInfo(dr);
this.Add(info);
}
IsReadOnly = true; <-- turn readonly back on
Doug
Copyright (c) Marimer LLC