What is the purpose of the ConcurrencyStamp column in the AspNetUsers table in the new ASP.NET MVC 6 identity?

前端 未结 4 1245
庸人自扰
庸人自扰 2020-12-25 09:18

What is the purpose of the ConcurrencyStamp column in the AspNetUsers table in the new ASP.NET MVC 6 identity?

This is the database schema

4条回答
  •  执笔经年
    2020-12-25 10:17

    Also important to realize that this is actually a data layer feature. The schema for Identity defines the column as being a concurrency column but doesn't actually use it.

    There's no logic going on inside the Identity codebase - it's only when EFCore actually goes to save it that it kicks in.

    https://docs.microsoft.com/en-us/ef/core/modeling/concurrency

    EF Code First - IsConcurrencyToken()

提交回复
热议问题