locked
Table Per Type Inheritance, Concurrency and TimeStamp annotation RRS feed

  • Question

  • Hi all

    I am using Table Per Type Inheritance and was wondering if EF 4.2 still has the limitation to perform concurrency checks on derived type. I try adding the following line in my Derived Entity:

    [Timestamp]
    public Byte[] Timestamp { get; set; }

    and got error: "...defines new concurrency requirements that are not allowed for subtypes of base EntitySet types"

    Thank you

     


    Max
    • Edited by Maximusdm Wednesday, January 11, 2012 8:21 PM
    Wednesday, January 11, 2012 5:19 PM

Answers

  • Hi Max,

    Welcome!

    You're right, it is not supported in derived type. The workaround is to use Stroed procedure to check the concurrency(database first).

    You can refer this content here: Concurrency Derived type

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    • Edited by Alan_chen Thursday, January 12, 2012 7:31 AM
    • Marked as answer by Maximusdm Thursday, January 12, 2012 8:35 PM
    Thursday, January 12, 2012 7:29 AM

All replies

  • Hi Max,

    Welcome!

    You're right, it is not supported in derived type. The workaround is to use Stroed procedure to check the concurrency(database first).

    You can refer this content here: Concurrency Derived type

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    • Edited by Alan_chen Thursday, January 12, 2012 7:31 AM
    • Marked as answer by Maximusdm Thursday, January 12, 2012 8:35 PM
    Thursday, January 12, 2012 7:29 AM
  • Thanks Alan -- that was exactly the same source I got this info from.

    I was just hoping version 4.2 had added this feature in :-)

    Thanks


    Max
    Thursday, January 12, 2012 8:35 PM