I am having problems upgrading from CSLA 2.0.3 to 2.1.
I have figured out how to upgrade the validation rules, but I am receiving an error while saving one of my objects.
the error I receive is Type 'System.Data.Common.DbConnection' in Assembly 'System.Data, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.
Can anyone tell me what I need to change to get this to work?
You must have a handle to a DbConnection as a member variable for a business object you're trying to serialize or you have a HANDLE to an object from within a business object you're trying to serialize (doing any sort of data portal operation with, really).
Anything that is part of the object graph will attempt to be serialized - and as you can see, DbConnection is not marked as serializable.
Or - you have put the DbConnection in ApplicationContext.ClientContext or ApplicationContext.GlobalContext that are also serialized. If this is the case then change to use ApplicationContext.LocalContext instead as LocalContext only exist on the running machine and is not serialized to remote portal.
Copyright (c) Marimer LLC