2 posts, 1 answers
  1. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 14 Jul 2011 Link to this post


    maybe a double post, but regarding Open Access I'm always asking myself if I'm reading a post or a blog on the old or the new way... the doc and blogs are not dated so that makes it that much harder...

    I'm having some general questions regarding Open Access, latest version Q2 2011. I'll post them separately.

    Q:how do I handle transactions? I se some examples using a scopeprovider, but I thought this was the old way, I'm using a context. but my context and scope give me an error saying that I can't start a transaction because the connnection is "managed".


  2. Answer
    Kosta Hristov
    Kosta Hristov avatar
    13 posts

    Posted 18 Jul 2011 Link to this post

    Hello Erik,

    You are right, the old approach - with an object scope provider, requires the transactions to be handled manually. However, with the introduction of the new API, this is no longer needed. When you create a domain context, a new transaction starts automatically. To commit the transaction, simply call context.SaveChanges(). This will save your changes and start a new transaction. If you want to revert the changes, call DataContext.ClearChanges() instead.
    I hope this answers your question. Please do not hesitate to contact us if you need more help.

    Kind regards,
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft banner
Back to Top