I would like to create an editable list of read only objects. My first attempt was as follows:
<Serializable()> _
Public Class HolidayList Inherits BusinessListBase(Of HolidayList, HolidayInfo)
End
ClassWhere HolidayInfo is a ReadOnlyBase. Obviously I can not do this because BusinessListBase expects to receive the BusinessBase (at least this is how I understand it). So what would be the best way to go about creating a list that I can add and delete objects to the list without the requirement of the objects themselves being editable?
I believe you need to create business base based object
(HolidayInfo) with all properties declared as read-only.
Sergey Barskiy
Senior Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: dla0819
[mailto:cslanet@lhotka.net]
Sent: Thursday, May 29, 2008 4:44 PM
To: Sergey Barskiy
Subject: [CSLA .NET] Read only object in an editable list
I would like to create an editable list of read only objects. My first
attempt was as follows:
<Serializable()> _
Public Class HolidayList
Inherits BusinessListBase(Of
HolidayList, HolidayInfo)
End Class
Where HolidayInfo is a ReadOnlyBase.
Obviously I can not do this because BusinessListBase expects to receive
the BusinessBase (at least this is how I understand it). So what would be
the best way to go about creating a list that I can add and delete objects to
the list without the requirement of the objects themselves being editable?
Copyright (c) Marimer LLC