From d4d105d5b529c8e1701010cb49bc115f0aa23ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fran=C3=A7a?= Date: Wed, 14 Dec 2016 08:36:54 -0200 Subject: [PATCH] Set ConcurrencyStamp current value using lambdas. --- .../IdentityDbContext.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNet.Identity.AspNetCoreCompat/IdentityDbContext.cs b/src/Microsoft.AspNet.Identity.AspNetCoreCompat/IdentityDbContext.cs index 8cee968e94..e773e39574 100644 --- a/src/Microsoft.AspNet.Identity.AspNetCoreCompat/IdentityDbContext.cs +++ b/src/Microsoft.AspNet.Identity.AspNetCoreCompat/IdentityDbContext.cs @@ -126,11 +126,11 @@ namespace Microsoft.AspNet.Identity.CoreCompat { if (entityEntry.Entity is TUser && entityEntry.State == EntityState.Modified) { - entityEntry.Property("ConcurrencyStamp").CurrentValue = Guid.NewGuid().ToString(); + entityEntry.Cast().Property(p => p.ConcurrencyStamp).CurrentValue = Guid.NewGuid().ToString(); } else if (entityEntry.Entity is TRole && entityEntry.State == EntityState.Modified) { - entityEntry.Property("ConcurrencyStamp").CurrentValue = Guid.NewGuid().ToString(); + entityEntry.Cast().Property(p => p.ConcurrencyStamp).CurrentValue = Guid.NewGuid().ToString(); } return base.ValidateEntity(entityEntry, items); }