Asp.Net Identity 2 duplicate username check -



Asp.Net Identity 2 duplicate username check -

usermanager in asp.net identity 2 prevents creation user duplicate username through additional request database find possible duplicate. think error prone , can cause concurrency errors. right mechanism should rely on on unique constraints or indexes. wrong , miss something?

links source: createasync , validateusername

no, not wrong. , identity adds unique index on username column:

and migration code table is:

createtable( "dbo.aspnetusers", c => new { id = c.string(nullable: false, maxlength: 128), /* .... snip .... */ username = c.string(nullable: false, maxlength: 256), }) .primarykey(t => t.id) .index(t => t.username, unique: true, name: "usernameindex");

unique index set on column.

p.s. looking on identity v3 - not released. current identity v2.1 not open source yet.

asp.net asp.net-identity

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -