brockallen / BrockAllen.MembershipReboot

MembershipReboot is a user identity management and authentication library.
Other
742 stars 238 forks source link

Best practice for Key/ID #674

Closed TDK1964 closed 8 years ago

TDK1964 commented 8 years ago

All my tables have 2 audit fields DateModified and ModifiedBy. My question is should the ModifiedBy type be an int or a Guid? My initial thoughts where it should be the guid because HttpContext.Current.User.GetUserID() return a guid.

brockallen commented 8 years ago

Depends. Are the users doing the modification from the same system? Use whatever makes sense for your system. The GUID is the unique identifier for the user. The int is just a DB index/key.