This is a migrated thread and some comments may be shown as answers.

How to Use ObjectContainer with the new visual designer

1 Answer 66 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Omar
Top achievements
Rank 1
Omar asked on 21 Jun 2011, 08:49 PM
Hello,

I have followed the steps described in this help page to update the changes in the ObjectContainer to the scope, but it throws a runtime exception "The method Begin is not supported for managed transactions."

Please help me as im using the Visual model designer and this functionality is for the old model way
The code i use is
ccData = ObjectContainer.CommitChanges(
  changedData,
  Telerik.OpenAccess.ObjectContainer.Verify.Changed,
  DB.GetInternalScope(),
  true,
  true);


and DB.GetInternalScope is
public IObjectScope GetInternalScope() {
      return this.GetScope();
}


1 Answer, 1 is accepted

Sort by
0
Accepted
Jan Blessenohl
Telerik team
answered on 22 Jun 2011, 11:55 AM
Hello Omar,
Please use a fresh scope for your operation.
public IObjectScope GetNewInternalScope() {
  
      return this.GetScope().Database.GetObjectScope();
  
}

Greetings,
Jan Blessenohl
the Telerik team
Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
Tags
Development (API, general questions)
Asked by
Omar
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Share this question
or