Simple N Tier sample #2506
-
Hi all, I have an old system using CSLA 3.5 which I have recently upgraded to run using 4.11.2. However what I have is a 3.5 style system using a newer CSLA version. I have never used an Object factory and wanted to see how it all hangs together without the XYZ methods. I have looked through a number of web sites and it appear that Simple N Tier is the most up to date sample. So I thought lets start with this. All looks good for what was demonstrated and my next idea was to see how to get a collection of Orders. So modified the form1.cs file by adding one line to allow me to see how a list of Orders would be processed. This is the line 'var o = await DataPortal.FetchAsync<BusinessLibrary.OrderList>();' before line 30 in the original file. Nothing drastic and I was pleased to see that the code found its way to the FetchList in the OrderFactory so one unknown for me solved. However it is here that I encountered a problem. Even thought there are 4 entries in the MockDb.Orders. It does not process them all and generates an error. Only the first entry is placed in the OrderList. The error is at line 44 of the Object factory - System.NotSupportedException: Can not change a read-only list or collection. I may have missed something here because you have to be able to add to a list but I cannot see anything in any of the code to allow this to occur. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
An Object Factory class should inherit from It appears the example does not set the
|
Beta Was this translation helpful? Give feedback.
-
I would think submitting an issue would do the trick. |
Beta Was this translation helpful? Give feedback.
I would think submitting an issue would do the trick.