locked
Lightswitch Odata - Concurrency Issues RRS feed

Answers

  • It's a ConcurrencyException (from the Microsoft.LightSwitch namespace). Catch it and enumerate the EntitiesWithConflicts property.

    Justin Anderson, LightSwitch Development Team

    • Proposed as answer by ADefwebserver Monday, July 29, 2013 9:10 PM
    • Marked as answer by Angie Xu Friday, August 9, 2013 10:04 AM
    Monday, July 29, 2013 9:07 PM
    Moderator
  • Hi Dragonalw,
    It is suggested to add  DLL reference in LightSwitch to complete using the Microsoft.LightSwitch namespace in another project.
    Please refer to the following steps:
    1)In 'Solution Explorer', click on the last menu-button at the top which is a drop-down and select 'File View'.
    2)Expand the 'References' node of the project you are interested in (If you are using VB, you need to first select the project node and click on 'Show All Files').
    3)add/remove references.
    4)To go back to the default view, click on a project node, click on the drop-down and select 'Logical View'.

    Yunjie Pei
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Yunjie Pei - MSFT Thursday, August 8, 2013 9:01 AM
    • Marked as answer by Angie Xu Friday, August 9, 2013 10:04 AM
    Tuesday, August 6, 2013 12:59 AM

All replies

  • Yes but you have to handle it yourself. You can interrogate the validation errors returned. I don't know of any code examples however.

    Unleash the Power - Get the LightSwitch HTML Client book

    http://LightSwitchHelpWebsite.com

    Monday, July 29, 2013 2:03 PM
  • Thanks.

    I get this error message (German)

    Fehler beim Sendevorgang aufgrund von Konflikten. Fragen Sie IEntityObject.Details.EntityConflict für jede Entität in EntitiesWithConflicts ab, um weitere Informationen zu erhalten.

    So I should query IEntityObject.Details.EntityConflict for every entity with EntitiesWithConflicts. But I do not know how to do this with my exception?

    Thanks.

    Monday, July 29, 2013 2:34 PM
  • Monday, July 29, 2013 2:45 PM
  • I tried to find the entities and the data in the debug mode, but I am not able to find the concurrency data.

    Monday, July 29, 2013 3:44 PM
  • It's a ConcurrencyException (from the Microsoft.LightSwitch namespace). Catch it and enumerate the EntitiesWithConflicts property.

    Justin Anderson, LightSwitch Development Team

    • Proposed as answer by ADefwebserver Monday, July 29, 2013 9:10 PM
    • Marked as answer by Angie Xu Friday, August 9, 2013 10:04 AM
    Monday, July 29, 2013 9:07 PM
    Moderator
  • Hi,

    is it possible to use the Microsoft.LightSwitch namespace in another project?

    Thanks.

    Markus

    Monday, July 29, 2013 9:37 PM
  • Hi Dragonalw,
    It is suggested to add  DLL reference in LightSwitch to complete using the Microsoft.LightSwitch namespace in another project.
    Please refer to the following steps:
    1)In 'Solution Explorer', click on the last menu-button at the top which is a drop-down and select 'File View'.
    2)Expand the 'References' node of the project you are interested in (If you are using VB, you need to first select the project node and click on 'Show All Files').
    3)add/remove references.
    4)To go back to the default view, click on a project node, click on the drop-down and select 'Logical View'.

    Yunjie Pei
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Yunjie Pei - MSFT Thursday, August 8, 2013 9:01 AM
    • Marked as answer by Angie Xu Friday, August 9, 2013 10:04 AM
    Tuesday, August 6, 2013 12:59 AM