以下代码未更新我的数据库以查找找到的记录,在查看Azure SQL Profiler时,我只看到此更新语句。
update [dbo].[Identities]
set @p = 0
where ([Id] = @0)
和代码:
using (var db = new context())
{
var member = db.Identities.Include("Member").Include("Roles")
.FirstOrDefault(i => id.Value == i.nameidentifier && i.identityprovider == provider.Value);
if (member != null)
{
member.LastLoggedIn = DateTime.UtcNow;
db.SaveChanges();
}
}