Hi Frans,
I'm trying to something which seems like it should be quite simple. I'm using the adapter method, i have a project called MyBusinessObjects which contains a number of classes that inherit from the generated entity objects, which i'll put any custom code i need to. For example MyCustomerEntity will inherit from CustomerEntity.
The problem i'm having is when saving this and related classes using SaveEntity and SaveEntityCollection.
The SaveEntity(myCustomerEntity) and SaveEntityCollection(myCustomerEntity.Orders) are both giving me errors.
If i create a new CustomerEntity
CustomerEntity ce = new CustomerEntity(myCustomerEntity.Fields)
And pass that it it will save but then i don't have access to the related EntityCollection MyCustomerEntity.Orders which also needs to be saved.
Is there any way to cast the derived classes so that i can pass them into the save methods? Or am i going about this the wrong way?
Thanks,
Daniel
EDIT: Sorry Frans the cast wasn't the issue here. The error was related to a date field that was being set to null but is being assigned the Min DateTime Value. Sorry again.