我有我自己的实现GetUserId()函数使得静态能够在静态上下文中检索ID。但我也有很多地方使用内置于asp.net UserManager库中的标准GetUserId()函数。我不使用不同的逻辑同样的事情被重写非静态方法和使用里面的静态的(这是UserManagerService类中)修复: public override string GetUserId(ClaimsPrincipal us
比方说,我们有专人实体: class Person {
/*
once the id is assigned, then must not be modified!
assume that the id will be assigned by the ORM framework
*/
int id;
String givenName;