This document is the change log for version 2.0.2 of CSLA .NET.
- [C# only] DataPortal_OnDataPortalException() now has the correct method signature.
- Make the Delete() method virtual so a business class can override it, typically to prevent the accidental use of deferred deletion.
- Add IsNew and IsSavable to the interface.
- Fix bug with SetItem() where the old item was removed before the new item was assigned – causing the loss of a valid item in the list (or an exception if the last item was to be replaced).
Csla – Data portal classes
- Change the Fetch() method chain (from the client-side DataPortal class through to SimpleDataPortal) to explicitly pass the business object type information like the Create() method does in the book. This change allows Fetch() to be called with no Criteria object, just like Create().
- Handle overload method detection differently to avoid an ambiguous match exception when a Nothing/null parameter is passed.
NOTE THAT THIS MAY BE A BREAKING CHANGE!
If you are calling DataPortal.Create() with a Nothing/null criteria (or no criteria at all) and you are declaring your DataPortal_Create() method to accept a strongly typed criteria parameter (rather than a parameter of type object) then this change WILL break your code! The following combination is now illegal!
Public Shared Function NewCustomer()
Return DataPortal.Create(Of Customer)()
'Return DataPortal.Create(Of Customer)(Nothing)
Private Overloads Sub DataPortal_Create( _
ByVal criteria As Criteria)
If you declare DataPortal_Create() to accept a parameter of type object there is no problem.
- [VB only] Make the data access methods Overridable to match the C# implementation.
ProjectTracker - PTWin
- Change the code behind the save buttons in ProjectEdit, ResourceEdit and RolesEdit to call the binding source EndEdit() methods rather than ApplyEdit() on the business objects.
ProjectTracker - PTData
- Fix capitalization of projectId and resourceId in the stored procedure script.