Hi many thanks for your code...
just a quick question on the code snippet below:
I get an exception generated that indicates that the The field 'CategoryId' is read-only and can't be changed thrown on the call to SetNewFieldValue.
Is there an option when you generate your entity classes to produce Get AND Set methods so that this exception wont be thrown?
See below for code snippet:
Cheers
Rich
SupportCategoryCollection collection = new SupportCategoryCollection();
DataTable tb = RetrievalProcedures.RumGetSupportCategories();
// generic routine
foreach(DataRow row in tb.Rows) {
SupportCategoryEntity e = new SupportCategoryEntity();
for(int i=0;i<tb.Columns.Count;i++) {
e.SetNewFieldValue(i, row[i]);
}
collection.Add(e);
}
return collection;