disconnected API is related to the classic scope approach. Instead of using an ObjectScopeProvider
, you can do the trick with which to expose a scope which is related to the OpenAccessContext
. The generated class for the domain context is a partial one, so you can extend its definition in a separate file (so that the code generation does not clear your changes):
NorthwindEntityDiagrams : OpenAccessContext
You can expose the method GetScope().
With regard to the update of the database I am not sure I understand what exactly your situation is. Are you trying to add additional properties to the entities and then forward map them to columns in the database while you have data in the tables? There are cases when adding a column (which cannot be null and does not provide default values) will result in a database server error - one case is when the table is populated with some data. The existing data should also have values for the column but since the value cannot be null, the database does not know what values to place and an error is generated.
We would mostly welcome any additional information you can give us regarding the exception you receive. We are looking forward to your reply.
the Telerik team